Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.util
Class JRValueStringUtils

    java.lang.Object
      net.sf.jasperreports.engine.util.JRValueStringUtils

    public final class JRValueStringUtils

extends java.lang.Object

Utility class used to serialize/deserialize value objects to/from String values.

Specific logic is used to convert to and from Strings values of the following types:

- `java.lang.String`
- `java.lang.Character`
- `java.lang.Boolean`
- `java.lang.Byte`
- `java.lang.Short`
- `java.lang.Integer`
- `java.lang.Long`
- `java.lang.Float`
- `java.lang.Double`
- `java.math.BigInteger`
- `java.math.BigDecimal`
- `java.util.Date`
- `java.sql.Timestamp`
- `java.sql.Time`

Object of other types are serialized and the resulting binary data is converted into a String using the BASE64 encoding.

Version:
  $Id: JRValueStringUtils.java 3712 2010-04-08 09:53:09Z teodord $
Author:
  Lucian Chirita (lucianc@users.sourceforge.net)

Nested Class Summary
`protected static class` | `JRValueStringUtils.BigDecimalSerializer`
`protected static class` | `JRValueStringUtils.BigIntegerSerializer`
`protected static class` | `JRValueStringUtils.BooleanSerializer`
`protected static class` | `JRValueStringUtils.ByteSerializer`
`protected static class` | `JRValueStringUtils.CharacterSerializer`
`protected static class` | `JRValueStringUtils.DateSerializer`
`protected static class` | `JRValueStringUtils.DefaultSerializer`
`protected static class` | `JRValueStringUtils.DoubleSerializer`
`protected static class` | `JRValueStringUtils.FloatSerializer`
`protected static class` | `JRValueStringUtils.IntegerSerializer`
`protected static class` | `JRValueStringUtils.LongSerializer`
`protected static class` | `JRValueStringUtils.ShortSerializer`
`protected static class` | `JRValueStringUtils.StringSerializer`
`protected static class` | `JRValueStringUtils.TimeSerializer`
`protected static class` | `JRValueStringUtils.TimestampSerializer`
`protected static interface` | `JRValueStringUtils.ValueSerializer`

Method Summary
`static java.lang.Object` | `deserialize(java.lang.String valueClass, java.lang.String data)` Converts a String back into a value.
`protected static JRValueStringUtils.ValueSerializer` | `getSerializer(java.lang.String valueClass)`
`static java.lang.String` | `serialize(java.lang.String valueClass, java.lang.Object value)` Converts a value into a String representation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### serialize

    public static java.lang.String serialize(java.lang.String valueClass,
                                             java.lang.Object value)

  Converts a value into a String representation.

  Parameters:
    `valueClass` - the type of the value
    `value` - the value
  Returns:
    the String representation of the value

### deserialize

    public static java.lang.Object deserialize(java.lang.String valueClass,
                                               java.lang.String data)

  Converts a String back into a value.

  Parameters:
    `valueClass` - the type of the value
    `data` - the String representation of the value
  Returns:
    the value

### getSerializer

    protected static JRValueStringUtils.ValueSerializer getSerializer(java.lang.String valueClass)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com