|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.util.Streams
This class contains some utility functions for streams.
Constructor Summary | |
Streams()
|
Method Summary | |
static void |
copy(InputStream in,
OutputStream out)
Read data from an InputStream and writes it to an OutputStream |
static byte[] |
readStream(InputStream fin)
Reads an input stream until it reaches the end and store the data in an array of bytes. |
static int |
readUByte(InputStream in)
Reads unsigned byte |
static long |
readUInt(InputStream in)
Reads an unsigned integer in little endian encoding |
static int |
readUShort(InputStream in)
Reads unsigned short in little endian encoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Streams()
Method Detail |
public static byte[] readStream(InputStream fin) throws IOException
this method was extracted "as is" from javassist 1.0 from Shigeru Chiba.
fin
- the input stream to read the class from
IOException
- if the size of the file is equal or more than 1Mbyte.public static long readUInt(InputStream in) throws IOException
in
- the stream to read the integer from
IOException
public static int readUShort(InputStream in) throws IOException
in
- the stream to read the short integer from
IOException
public static int readUByte(InputStream in) throws IOException
in
- the stream to read the byte from
IOException
public static void copy(InputStream in, OutputStream out) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |