|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.common.stream.StreamUtil
public final class StreamUtil
Field Summary | |
---|---|
(package private) static byte |
BOOLEAN
|
(package private) static byte |
BYTE
|
(package private) static byte |
BYTEARRAY
|
(package private) static byte |
DOUBLE
|
(package private) static byte[] |
EMPTY_BYTE_ARRAY
|
(package private) static java.lang.String |
EMPTY_STRING
|
static int |
FALSE
|
(package private) static byte |
FLOAT
|
(package private) static byte |
INT
|
(package private) static byte |
LONG
|
(package private) static byte |
NULL
|
private static java.lang.ThreadLocal |
perThreadBuffer
|
(package private) static byte |
SHORT
|
(package private) static byte |
STRING
|
static int |
TRUE
|
Constructor Summary | |
---|---|
StreamUtil()
|
Method Summary | |
---|---|
static boolean[] |
readArrayOfBooleanFrom(java.io.InputStream is)
This method allows to restore a boolean array from the input stream. |
static int[] |
readArrayOfIntFrom(java.io.InputStream is)
This method allows to restore a int array from the input stream. |
static java.lang.String[] |
readArrayOfStringFrom(java.io.InputStream is)
This method allows to restore a String array from the input stream. |
static boolean |
readBooleanFrom(java.io.InputStream is)
This method allows to restore a boolean from the input stream. |
static byte[] |
readByteArrayFrom(java.io.InputStream is)
This method allows to restore a byte array from the input stream. |
static byte[] |
readByteArrayFrom(java.io.InputStream is,
int length)
This method allows to restore a byte array from the input stream. |
static byte |
readByteFrom(java.io.InputStream is)
This method allows to restore a byte from the input stream. |
static double |
readDoubleFrom(java.io.InputStream is)
This method allows to restore a double from the input stream. |
static float |
readFloatFrom(java.io.InputStream is)
This method allows to restore a float from the input stream. |
private static void |
readFully(byte[] buf,
java.io.InputStream is)
|
private static byte[] |
readFully(int length,
java.io.InputStream is)
|
static int |
readIntFrom(java.io.InputStream is)
This method allows to restore an integer from the input stream. |
static java.util.Properties |
readJPropertiesFrom(java.io.InputStream is)
This method allows to restore a java.util.Properties object from the input stream. |
static long |
readLongFrom(java.io.InputStream is)
This method allows to restore a long from the input stream. |
static java.lang.Object |
readObjectFrom(java.io.InputStream is)
This method allows to restore an object from the input stream. |
static Properties |
readPropertiesFrom(java.io.InputStream is)
This method allows to restore a Properties object from the input stream. |
static short |
readShortFrom(java.io.InputStream is)
This method allows to restore a short from the input stream. |
static java.lang.String |
readShortStringFrom(java.io.InputStream is)
This method allows to restore a short String from the input stream. |
static java.lang.String |
readStringFrom(java.io.InputStream is)
This method allows to restore a String from the input stream. |
static int |
readUnsignedByteFrom(java.io.InputStream is)
This method allows to restore a byte from the input stream. |
static long |
readUnsignedIntFrom(java.io.InputStream is)
This method allows to restore an integer from the input stream. |
static java.util.Vector |
readVectorOfStringFrom(java.io.InputStream is)
This method allows to restore a vector of String objects from the input stream. |
static void |
writeArrayOfBooleanTo(boolean[] array,
java.io.OutputStream os)
This method allows to write a boolean array to the output stream. |
static void |
writeArrayOfIntTo(int[] array,
java.io.OutputStream os)
This method allows to write a int array to the output stream. |
static void |
writeArrayOfStringTo(java.lang.String[] array,
java.io.OutputStream os)
This method allows to write a String array to the output stream. |
static void |
writeObjectTo(java.lang.Object obj,
java.io.OutputStream os)
This method allows to write an object to the output stream. |
static void |
writeTo(boolean b,
java.io.OutputStream os)
This method allows to write a boolean to the output stream. |
static void |
writeTo(byte[] tab,
java.io.OutputStream os)
This method allows to write byte array to the output stream. |
static void |
writeTo(byte b,
java.io.OutputStream os)
This method allows to write a byte to the output stream. |
static void |
writeTo(double d,
java.io.OutputStream os)
This method allows to write a double to the output stream. |
static void |
writeTo(float f,
java.io.OutputStream os)
This method allows to write a float to the output stream. |
static void |
writeTo(int i,
java.io.OutputStream os)
This method allows to write an integer to the output stream. |
static void |
writeTo(long l,
java.io.OutputStream os)
This method allows to write a long to the output stream. |
static void |
writeTo(Properties p,
java.io.OutputStream os)
This method allows to write a Properties object to the output stream. |
static void |
writeTo(java.util.Properties p,
java.io.OutputStream os)
This method allows to write a java.util.Properties object to the output stream. |
static void |
writeTo(short s,
java.io.OutputStream os)
This method allows to write a short to the output stream. |
static void |
writeTo(java.lang.String str,
java.io.OutputStream os)
This method allows to write a String to the output stream. |
static void |
writeVectorOfStringTo(java.util.Vector v,
java.io.OutputStream os)
This method allows to write a vector of String objects to the output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.ThreadLocal perThreadBuffer
public static final int TRUE
public static final int FALSE
static final java.lang.String EMPTY_STRING
static final byte[] EMPTY_BYTE_ARRAY
static final byte NULL
static final byte BOOLEAN
static final byte BYTE
static final byte SHORT
static final byte INT
static final byte LONG
static final byte FLOAT
static final byte DOUBLE
static final byte STRING
static final byte BYTEARRAY
Constructor Detail |
---|
public StreamUtil()
Method Detail |
---|
private static byte[] readFully(int length, java.io.InputStream is) throws java.io.IOException
java.io.IOException
private static void readFully(byte[] buf, java.io.InputStream is) throws java.io.IOException
java.io.IOException
public static void writeTo(boolean b, java.io.OutputStream os) throws java.io.IOException
b
- the boolean to writeos
- the stream to write the object to
java.io.IOException
public static boolean readBooleanFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(byte b, java.io.OutputStream os) throws java.io.IOException
b
- the byte to writeos
- the stream to write the object to
java.io.IOException
public static byte readByteFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static int readUnsignedByteFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(short s, java.io.OutputStream os) throws java.io.IOException
s
- the short to writeos
- the stream to write the object to
java.io.IOException
public static short readShortFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(int i, java.io.OutputStream os) throws java.io.IOException
i
- the integer to writeos
- the stream to write the object to
java.io.IOException
public static int readIntFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static long readUnsignedIntFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(long l, java.io.OutputStream os) throws java.io.IOException
l
- the long to writeos
- the stream to write the object to
java.io.IOException
public static long readLongFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(float f, java.io.OutputStream os) throws java.io.IOException
f
- the float to writeos
- the stream to write the object to
java.io.IOException
public static float readFloatFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(double d, java.io.OutputStream os) throws java.io.IOException
d
- the double to writeos
- the stream to write the object to
java.io.IOException
public static double readDoubleFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(java.lang.String str, java.io.OutputStream os) throws java.io.IOException
str
- the String to writeos
- the stream to write the object to
java.io.IOException
public static java.lang.String readStringFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static java.lang.String readShortStringFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(byte[] tab, java.io.OutputStream os) throws java.io.IOException
tab
- the byte array to writeos
- the stream to write the object to
java.io.IOException
public static byte[] readByteArrayFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static byte[] readByteArrayFrom(java.io.InputStream is, int length) throws java.io.IOException
is
- the stream to read data from in order to restore the objectlength
- the length of bytes to read
java.io.IOException
public static void writeObjectTo(java.lang.Object obj, java.io.OutputStream os) throws java.io.IOException
obj
- the object to writeos
- the stream to write the object to
java.io.IOException
public static java.lang.Object readObjectFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeTo(Properties p, java.io.OutputStream os) throws java.io.IOException
p
- the Properties object to writeos
- the stream to write the object to
java.io.IOException
public static Properties readPropertiesFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeVectorOfStringTo(java.util.Vector v, java.io.OutputStream os) throws java.io.IOException
v
- the Vector object to writeos
- the stream to write the object to
java.io.IOException
public static java.util.Vector readVectorOfStringFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
public static void writeArrayOfStringTo(java.lang.String[] array, java.io.OutputStream os) throws java.io.IOException
array
- the String array to writeos
- the stream to write to
java.io.IOException
public static java.lang.String[] readArrayOfStringFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the String array
java.io.IOException
public static void writeArrayOfIntTo(int[] array, java.io.OutputStream os) throws java.io.IOException
array
- the int array to writeos
- the stream to write to
java.io.IOException
public static int[] readArrayOfIntFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the int array
java.io.IOException
public static void writeArrayOfBooleanTo(boolean[] array, java.io.OutputStream os) throws java.io.IOException
array
- the boolean array to writeos
- the stream to write to
java.io.IOException
public static boolean[] readArrayOfBooleanFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the boolean array
java.io.IOException
public static void writeTo(java.util.Properties p, java.io.OutputStream os) throws java.io.IOException
p
- the java.util.Properties object to writeos
- the stream to write the object to
java.io.IOException
public static java.util.Properties readJPropertiesFrom(java.io.InputStream is) throws java.io.IOException
is
- the stream to read data from in order to restore the object
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |