| Modifier and Type | Field and Description |
|---|---|
| private static int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | pipeAll(InputStream
source input stream. inStr, OutputStream destination output stream. outStr)Write the full contents of inStr to the destination stream outStr. |
| public static void | pipeAll(InputStream
source input stream. inStr, OutputStream destination output stream. outStr, int the size of temporary buffer to use. bufferSize)Write the full contents of inStr to the destination stream outStr. |
| public static long | pipeAllLimited(InputStream
source input stream. inStr, long the maximum number of bytes allowed to be read. limit, OutputStream destination output stream. outStr)Write up to limit bytes of data from inStr to the destination stream outStr. |
| public static byte[] | Returns: a byte array representing the contents of inStr.stream to be read. inStr)Read stream fully, returning contents in a byte array. |
| public static byte[] | Returns: a byte array representing the contents of inStr.stream to be read. inStr, int maximum number of bytes that can be read. limit)Read from inStr up to a maximum number of bytes, throwing an exception if more the maximum amount of requested data is available. |
| public static int | Returns: the number of bytes read into the buffer.the stream to be read. inStr, byte[] the buffer to be read into. buf)Fully read in buf's length in data, or up to EOF, whichever occurs first, |
| public static int | Returns: the number of bytes read into the buffer.the stream to be read. inStr, byte[] the buffer to be read into. buf, int offset into buf to start putting bytes into. off, int the number of bytes to be read. len)Fully read in len's bytes of data into buf, or up to EOF, whichever occurs first, |
| public static void | |
| public static void |
| BUFFER_SIZE | back to summary |
|---|---|
| private static int BUFFER_SIZE | |
| Streams | back to summary |
|---|---|
| public Streams() | |
| drain | back to summary |
|---|---|
| public static void drain(InputStream inStr) throws IOException Read stream till EOF is encountered.
| |
| pipeAll | back to summary |
|---|---|
| public static void pipeAll(InputStream inStr, OutputStream outStr) throws IOException Write the full contents of inStr to the destination stream outStr.
| |
| pipeAll | back to summary |
|---|---|
| public static void pipeAll(InputStream inStr, OutputStream outStr, int bufferSize) throws IOException Write the full contents of inStr to the destination stream outStr.
| |
| pipeAllLimited | back to summary |
|---|---|
| public static long pipeAllLimited(InputStream inStr, long limit, OutputStream outStr) throws IOException Write up to limit bytes of data from inStr to the destination stream outStr.
| |
| readAll | back to summary |
|---|---|
| public static byte[] readAll(InputStream inStr) throws IOException Read stream fully, returning contents in a byte array.
| |
| readAllLimited | back to summary |
|---|---|
| public static byte[] readAllLimited(InputStream inStr, int limit) throws IOException Read from inStr up to a maximum number of bytes, throwing an exception if more the maximum amount of requested data is available.
| |
| readFully | back to summary |
|---|---|
| public static int readFully(InputStream inStr, byte[] buf) throws IOException Fully read in buf's length in data, or up to EOF, whichever occurs first,
| |
| readFully | back to summary |
|---|---|
| public static int readFully(InputStream inStr, byte[] buf, int off, int len) throws IOException Fully read in len's bytes of data into buf, or up to EOF, whichever occurs first,
| |
| validateBufferArguments | back to summary |
|---|---|
| public static void validateBufferArguments(byte[] buf, int off, int len) | |
| writeBufTo | back to summary |
|---|---|
| public static void writeBufTo(ByteArrayOutputStream buf, OutputStream output) throws IOException | |