|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.droids.helper.Streams
public class Streams
Helper class for the low level treatment of bytes and streams. Principal usage is to receive a copy of an input stream.
Method Summary | |
---|---|
static byte[] |
streamCopy(InputStream in)
Reads all bytes from the given input stream and returns the result in an array. |
static byte[] |
streamCopy(InputStream in,
int size)
Reads the specified number of bytes from the given input stream and returns the result in an array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] streamCopy(InputStream in) throws IOException
in
- the input stream to read the bytes from
IOException
- in case of errors in the underlying java.io methods usedpublic static byte[] streamCopy(InputStream in, int size) throws IOException
in
- the input stream to read the bytes fromsize
- the number of bytes to read
IOException
- in case of errors in the underlying java.io methods used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |