org.jboss.messaging.util
Class StreamUtils
java.lang.Object
org.jboss.messaging.util.StreamUtils
public class StreamUtils
- extends java.lang.Object
A StreamUtils
Utility methods for reading and writing stuff to and from streams
- Version:
- $Revision: 2715 $
$Id: StreamUtils.java 2715 2007-05-19 15:31:23Z timfox $
- Author:
- Tim Fox
Method Summary |
static void |
fromBytes(Streamable streamable,
byte[] bytes)
|
static java.util.ArrayList |
readList(java.io.DataInputStream in)
|
static java.util.HashMap |
readMap(java.io.DataInputStream in,
boolean stringKeys)
|
static java.lang.Object |
readObject(java.io.DataInputStream in,
boolean longStrings)
|
static byte[] |
toBytes(Streamable streamable)
|
static void |
writeList(java.io.DataOutputStream out,
java.util.List list)
|
static void |
writeMap(java.io.DataOutputStream out,
java.util.Map map,
boolean stringKeys)
|
static void |
writeObject(java.io.DataOutputStream out,
java.lang.Object object,
boolean containerTypes,
boolean longStrings)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL
public static final byte NULL
- See Also:
- Constant Field Values
STRING
public static final byte STRING
- See Also:
- Constant Field Values
MAP
public static final byte MAP
- See Also:
- Constant Field Values
BYTE
public static final byte BYTE
- See Also:
- Constant Field Values
SHORT
public static final byte SHORT
- See Also:
- Constant Field Values
INT
public static final byte INT
- See Also:
- Constant Field Values
LONG
public static final byte LONG
- See Also:
- Constant Field Values
FLOAT
public static final byte FLOAT
- See Also:
- Constant Field Values
DOUBLE
public static final byte DOUBLE
- See Also:
- Constant Field Values
BOOLEAN
public static final byte BOOLEAN
- See Also:
- Constant Field Values
BYTES
public static final byte BYTES
- See Also:
- Constant Field Values
LIST
public static final byte LIST
- See Also:
- Constant Field Values
SERIALIZABLE
public static final byte SERIALIZABLE
- See Also:
- Constant Field Values
DESTINATION
public static final byte DESTINATION
- See Also:
- Constant Field Values
StreamUtils
public StreamUtils()
readObject
public static java.lang.Object readObject(java.io.DataInputStream in,
boolean longStrings)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
writeObject
public static void writeObject(java.io.DataOutputStream out,
java.lang.Object object,
boolean containerTypes,
boolean longStrings)
throws java.io.IOException
- Throws:
java.io.IOException
writeList
public static void writeList(java.io.DataOutputStream out,
java.util.List list)
throws java.io.IOException
- Throws:
java.io.IOException
readList
public static java.util.ArrayList readList(java.io.DataInputStream in)
throws java.lang.ClassNotFoundException,
java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
writeMap
public static void writeMap(java.io.DataOutputStream out,
java.util.Map map,
boolean stringKeys)
throws java.io.IOException
- Throws:
java.io.IOException
readMap
public static java.util.HashMap readMap(java.io.DataInputStream in,
boolean stringKeys)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
toBytes
public static byte[] toBytes(Streamable streamable)
throws java.lang.Exception
- Throws:
java.lang.Exception
fromBytes
public static void fromBytes(Streamable streamable,
byte[] bytes)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2006 JBoss Inc. All Rights Reserved.