org.apache.activemq.util
Class MarshallingSupport

java.lang.Object
  extended by org.apache.activemq.util.MarshallingSupport

public final class MarshallingSupport
extends java.lang.Object

The fixed version of the UTF8 encoding function. Some older JVM's UTF8 encoding function breaks when handling large strings.


Field Summary
static byte BIG_STRING_TYPE
           
static byte BOOLEAN_TYPE
           
static byte BYTE_ARRAY_TYPE
           
static byte BYTE_TYPE
           
static byte CHAR_TYPE
           
static byte DOUBLE_TYPE
           
static byte FLOAT_TYPE
           
static byte INTEGER_TYPE
           
static byte LIST_TYPE
           
static byte LONG_TYPE
           
static byte MAP_TYPE
           
static byte NULL
           
static byte SHORT_TYPE
           
static byte STRING_TYPE
           
 
Method Summary
static void marshalBoolean(java.io.DataOutputStream out, boolean value)
           
static void marshalByte(java.io.DataOutputStream out, byte value)
           
static void marshalByteArray(java.io.DataOutputStream out, byte[] value)
           
static void marshalByteArray(java.io.DataOutputStream out, byte[] value, int offset, int length)
           
static void marshalChar(java.io.DataOutputStream out, char value)
           
static void marshalDouble(java.io.DataOutputStream out, double value)
           
static void marshalFloat(java.io.DataOutputStream out, float value)
           
static void marshalInt(java.io.DataOutputStream out, int value)
           
static void marshalLong(java.io.DataOutputStream out, long value)
           
static void marshalNull(java.io.DataOutputStream out)
           
static void marshalPrimitive(java.io.DataOutputStream out, java.lang.Object value)
           
static void marshalPrimitiveList(java.util.List list, java.io.DataOutputStream out)
           
static void marshalPrimitiveMap(java.util.Map map, java.io.DataOutputStream out)
           
static void marshalShort(java.io.DataOutputStream out, short value)
           
static void marshalString(java.io.DataOutputStream out, java.lang.String s)
           
static java.lang.String propertiesToString(java.util.Properties props)
           
static java.lang.String readUTF8(java.io.DataInput dataIn)
           
static java.util.Properties stringToProperties(java.lang.String str)
           
static java.lang.String truncate64(java.lang.String text)
           
static java.lang.Object unmarshalPrimitive(java.io.DataInputStream in)
           
static java.util.List<java.lang.Object> unmarshalPrimitiveList(java.io.DataInputStream in)
           
static java.util.Map<java.lang.String,java.lang.Object> unmarshalPrimitiveMap(java.io.DataInputStream in)
           
static java.util.Map<java.lang.String,java.lang.Object> unmarshalPrimitiveMap(java.io.DataInputStream in, int maxPropertySize)
           
static void writeUTF8(java.io.DataOutput dataOut, java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final byte NULL
See Also:
Constant Field Values

BOOLEAN_TYPE

public static final byte BOOLEAN_TYPE
See Also:
Constant Field Values

BYTE_TYPE

public static final byte BYTE_TYPE
See Also:
Constant Field Values

CHAR_TYPE

public static final byte CHAR_TYPE
See Also:
Constant Field Values

SHORT_TYPE

public static final byte SHORT_TYPE
See Also:
Constant Field Values

INTEGER_TYPE

public static final byte INTEGER_TYPE
See Also:
Constant Field Values

LONG_TYPE

public static final byte LONG_TYPE
See Also:
Constant Field Values

DOUBLE_TYPE

public static final byte DOUBLE_TYPE
See Also:
Constant Field Values

FLOAT_TYPE

public static final byte FLOAT_TYPE
See Also:
Constant Field Values

STRING_TYPE

public static final byte STRING_TYPE
See Also:
Constant Field Values

BYTE_ARRAY_TYPE

public static final byte BYTE_ARRAY_TYPE
See Also:
Constant Field Values

MAP_TYPE

public static final byte MAP_TYPE
See Also:
Constant Field Values

LIST_TYPE

public static final byte LIST_TYPE
See Also:
Constant Field Values

BIG_STRING_TYPE

public static final byte BIG_STRING_TYPE
See Also:
Constant Field Values
Method Detail

marshalPrimitiveMap

public static void marshalPrimitiveMap(java.util.Map map,
                                       java.io.DataOutputStream out)
                                throws java.io.IOException
Throws:
java.io.IOException

unmarshalPrimitiveMap

public static java.util.Map<java.lang.String,java.lang.Object> unmarshalPrimitiveMap(java.io.DataInputStream in)
                                                                              throws java.io.IOException
Throws:
java.io.IOException

unmarshalPrimitiveMap

public static java.util.Map<java.lang.String,java.lang.Object> unmarshalPrimitiveMap(java.io.DataInputStream in,
                                                                                     int maxPropertySize)
                                                                              throws java.io.IOException
Parameters:
in -
Returns:
Throws:
java.io.IOException
java.io.IOException

marshalPrimitiveList

public static void marshalPrimitiveList(java.util.List list,
                                        java.io.DataOutputStream out)
                                 throws java.io.IOException
Throws:
java.io.IOException

unmarshalPrimitiveList

public static java.util.List<java.lang.Object> unmarshalPrimitiveList(java.io.DataInputStream in)
                                                               throws java.io.IOException
Throws:
java.io.IOException

marshalPrimitive

public static void marshalPrimitive(java.io.DataOutputStream out,
                                    java.lang.Object value)
                             throws java.io.IOException
Throws:
java.io.IOException

unmarshalPrimitive

public static java.lang.Object unmarshalPrimitive(java.io.DataInputStream in)
                                           throws java.io.IOException
Throws:
java.io.IOException

marshalNull

public static void marshalNull(java.io.DataOutputStream out)
                        throws java.io.IOException
Throws:
java.io.IOException

marshalBoolean

public static void marshalBoolean(java.io.DataOutputStream out,
                                  boolean value)
                           throws java.io.IOException
Throws:
java.io.IOException

marshalByte

public static void marshalByte(java.io.DataOutputStream out,
                               byte value)
                        throws java.io.IOException
Throws:
java.io.IOException

marshalChar

public static void marshalChar(java.io.DataOutputStream out,
                               char value)
                        throws java.io.IOException
Throws:
java.io.IOException

marshalShort

public static void marshalShort(java.io.DataOutputStream out,
                                short value)
                         throws java.io.IOException
Throws:
java.io.IOException

marshalInt

public static void marshalInt(java.io.DataOutputStream out,
                              int value)
                       throws java.io.IOException
Throws:
java.io.IOException

marshalLong

public static void marshalLong(java.io.DataOutputStream out,
                               long value)
                        throws java.io.IOException
Throws:
java.io.IOException

marshalFloat

public static void marshalFloat(java.io.DataOutputStream out,
                                float value)
                         throws java.io.IOException
Throws:
java.io.IOException

marshalDouble

public static void marshalDouble(java.io.DataOutputStream out,
                                 double value)
                          throws java.io.IOException
Throws:
java.io.IOException

marshalByteArray

public static void marshalByteArray(java.io.DataOutputStream out,
                                    byte[] value)
                             throws java.io.IOException
Throws:
java.io.IOException

marshalByteArray

public static void marshalByteArray(java.io.DataOutputStream out,
                                    byte[] value,
                                    int offset,
                                    int length)
                             throws java.io.IOException
Throws:
java.io.IOException

marshalString

public static void marshalString(java.io.DataOutputStream out,
                                 java.lang.String s)
                          throws java.io.IOException
Throws:
java.io.IOException

writeUTF8

public static void writeUTF8(java.io.DataOutput dataOut,
                             java.lang.String text)
                      throws java.io.IOException
Throws:
java.io.IOException

readUTF8

public static java.lang.String readUTF8(java.io.DataInput dataIn)
                                 throws java.io.IOException
Throws:
java.io.IOException

propertiesToString

public static java.lang.String propertiesToString(java.util.Properties props)
                                           throws java.io.IOException
Throws:
java.io.IOException

stringToProperties

public static java.util.Properties stringToProperties(java.lang.String str)
                                               throws java.io.IOException
Throws:
java.io.IOException

truncate64

public static java.lang.String truncate64(java.lang.String text)


Copyright © 2005-2011. All Rights Reserved.