Utility class for constructing and reading and writing arrays from/to
formatId streams.
version: 0.1 author: Rick Hillegas
Method Summary
public static void
readArrayItems(ObjectInput in, Object[] a) Read an array of objects out of a stream.
Parameters: in - Input stream Parameters: a - array to read into exception: java.io.IOException - The write caused an IOException.
public static int
readArrayLength(ObjectInput in) Read the length of an array of objects in an object stream.
Parameters: in - Input stream. length of the array of objects exception: java.io.IOException - The write caused an IOException.
writeArray(ObjectOutput out, Object[] a) Write an array of objects and length to an output stream.
Does equivalent of writeArrayLength() followed by writeArrayItems()
Parameters: out - Object output stream to write to. Parameters: a - array of objects to write. exception: java.io.IOException - The write caused an IOException.
public static void
writeArrayItems(ObjectOutput out, Object[] a) Write an array of objects to an output stream.
Parameters: out - Object output stream to write to. Parameters: a - array of objects to write. exception: java.io.IOException - The write caused an IOException.
public static void
writeArrayLength(ObjectOutput out, Object[] a) Write the length of an array of objects to an output stream.
The length
Parameters: out - ObjectOutput stream Parameters: a - array of objects whose length should be written. exception: java.io.IOException - The write caused an IOException.
Read an array of objects out of a stream.
Parameters: in - Input stream Parameters: a - array to read into exception: java.io.IOException - The write caused an IOException. exception: java.lang.ClassNotFoundException - The Class for an Object we are reading does not exist
Read the length of an array of objects in an object stream.
Parameters: in - Input stream. length of the array of objects exception: java.io.IOException - The write caused an IOException.
Read an array of integers from an ObjectInput. This allocates the
array.
Parameters: in - the ObjectInput. the array of integers. exception: java.io.IOException - The write caused an IOException.
Read an array of integers from an ObjectInput. This allocates the
array.
Parameters: in - the ObjectInput. the array of integers. exception: java.io.IOException - The write caused an IOException.
Read an array of integers from an ObjectInput. This allocates the
array.
Parameters: in - the ObjectInput. the array of integers. exception: java.io.IOException - The write caused an IOException.
Reads an array of objects from the stream.
Parameters: in - Input stream exception: java.io.IOException - The write caused an IOException. exception: java.lang.ClassNotFoundException - The Class for an Object we are reading does not exist
Read an array of strings from an ObjectInput. This allocates the
array.
Parameters: in - the ObjectInput. the array of integers. exception: java.io.IOException - The write caused an IOException.
Write an array of objects and length to an output stream.
Does equivalent of writeArrayLength() followed by writeArrayItems()
Parameters: out - Object output stream to write to. Parameters: a - array of objects to write. exception: java.io.IOException - The write caused an IOException.
Write an array of objects to an output stream.
Parameters: out - Object output stream to write to. Parameters: a - array of objects to write. exception: java.io.IOException - The write caused an IOException.
Write the length of an array of objects to an output stream.
The length
Parameters: out - ObjectOutput stream Parameters: a - array of objects whose length should be written. exception: java.io.IOException - The write caused an IOException.
Write an array of booleans to an ObjectOutput. This writes the array
in a format readBooleanArray understands.
Parameters: out - the ObjectOutput. Parameters: a - the array. exception: java.io.IOException - The write caused an IOException.
Write an array of integers to an ObjectOutput. This writes the array
in a format readIntArray understands.
Parameters: out - the ObjectOutput. Parameters: a - the array. exception: java.io.IOException - The write caused an IOException.
Write an array of longs to an ObjectOutput. This writes the array
in a format readLongArray understands.
Parameters: out - the ObjectOutput. Parameters: a - the array. exception: java.io.IOException - The write caused an IOException.