Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.util
Class ExternalizableLiteUtil

java.lang.Object
  extended by com.jivesoftware.util.ExternalizableLiteUtil

public class ExternalizableLiteUtil
extends java.lang.Object

Utility methods to assist in working with the Coherence ExternalizableLite interface. ExternalizableLite is very similar to the standard Externalizable interface, except that it uses DataOutput/DataInput instead of the Object stream equivalents.


Method Summary
static long[] readLongArray(java.io.DataInput in)
          Reads an array of long values.
static java.util.Map readLongIntMap(java.io.DataInput in)
          Reads a Map of Long key and Integer value pairs.
static LongList readLongList(java.io.DataInput in)
          Reads a LongList.
static java.util.List readStringList(java.io.DataInput in)
          Reads a List of Strings.
static java.util.Map readStringMap(java.io.DataInput in)
          Reads a Map of String key and value pairs.
static void writeLongArray(java.io.DataOutput out, long[] array)
          Writes an array of long values.
static void writeLongIntMap(java.io.DataOutput out, java.util.Map map)
          Writes a Map of Long key and Integer value pairs.
static void writeLongList(java.io.DataOutput out, LongList longList)
          Writes a LongList.
static void writeStringList(java.io.DataOutput out, java.util.List stringList)
          Writes a List of Strings.
static void writeStringMap(java.io.DataOutput out, java.util.Map stringMap)
          Writes a Map of String key and value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeStringMap

public static void writeStringMap(java.io.DataOutput out,
                                  java.util.Map stringMap)
                           throws java.io.IOException
Writes a Map of String key and value pairs. This method handles the case when the Map is null.

Parameters:
out - the output stream.
stringMap - the Map of String key/value pairs.
Throws:
java.io.IOException - if an error occurs.

readStringMap

public static java.util.Map readStringMap(java.io.DataInput in)
                                   throws java.io.IOException
Reads a Map of String key and value pairs. This method will return null if the Map written to the stream was null.

Parameters:
in - the input stream.
Returns:
a Map of String key/value pairs.
Throws:
java.io.IOException - if an error occurs.

writeLongIntMap

public static void writeLongIntMap(java.io.DataOutput out,
                                   java.util.Map map)
                            throws java.io.IOException
Writes a Map of Long key and Integer value pairs. This method handles the case when the Map is null.

Parameters:
out - the output stream.
map - the Map of Long key/Integer value pairs.
Throws:
java.io.IOException - if an error occurs.

readLongIntMap

public static java.util.Map readLongIntMap(java.io.DataInput in)
                                    throws java.io.IOException
Reads a Map of Long key and Integer value pairs. This method will return null if the Map written to the stream was null.

Parameters:
in - the input stream.
Returns:
a Map of Long key/Integer value pairs.
Throws:
java.io.IOException - if an error occurs.

writeStringList

public static void writeStringList(java.io.DataOutput out,
                                   java.util.List stringList)
                            throws java.io.IOException
Writes a List of Strings. This method handles the case when the List is null.

Parameters:
out - the output stream.
stringList - the List of Strings.
Throws:
java.io.IOException - if an error occurs.

readStringList

public static java.util.List readStringList(java.io.DataInput in)
                                     throws java.io.IOException
Reads a List of Strings. This method will return null if the List written to the stream was null.

Parameters:
in - the input stream.
Returns:
a List of Strings.
Throws:
java.io.IOException - if an error occurs.

writeLongArray

public static void writeLongArray(java.io.DataOutput out,
                                  long[] array)
                           throws java.io.IOException
Writes an array of long values. This method handles the case when the array is null.

Parameters:
out - the output stream.
array - the array of long values.
Throws:
java.io.IOException - if an error occurs.

readLongArray

public static long[] readLongArray(java.io.DataInput in)
                            throws java.io.IOException
Reads an array of long values. This method will return null if the array written to the stream was null.

Parameters:
in - the input stream.
Returns:
an array of long values.
Throws:
java.io.IOException - if an error occurs.

writeLongList

public static void writeLongList(java.io.DataOutput out,
                                 LongList longList)
                          throws java.io.IOException
Writes a LongList. This method handles the case when the list is null.

Parameters:
out - the output stream.
longList - the LongList.
Throws:
java.io.IOException - if an error occurs.

readLongList

public static LongList readLongList(java.io.DataInput in)
                             throws java.io.IOException
Reads a LongList. This method will return null if the LongList written to the stream was null.

Parameters:
in - the input stream.
Returns:
a LongList.
Throws:
java.io.IOException - if an error occurs.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.