| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | MAX_ARRAY_LEN
Max array length on JVM. |
| private static final OutputStream | |
| private static final int | TO_BYTE_ARRAY_DEQUE_SIZE
Large enough to never need to expand, given the geometric progression of buffer sizes. |
| private static final int | ZERO_COPY_CHUNK_SIZE
There are three methods to implement
|
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static byte[] | |
| public static long | Returns: the number of bytes copiedthe input stream to read from from, OutputStream the output stream to write to to)Copies all bytes from the input stream to the output stream. |
| public static long | Returns: the number of bytes copiedthe readable channel to read from from, WritableByteChannel the writable channel to write to to)Copies all bytes from the readable channel to the writable channel. |
| pack-priv static byte[] | |
| public static long | exhaust(InputStream in)
Reads and discards data from the given |
| public static InputStream | Returns: a length-limitedInputStreamthe input stream to be wrapped in, long the maximum number of bytes to be read limit)Wraps a |
| public static ByteArrayDataInput | newDataInput(byte[] bytes)
Returns a new |
| public static ByteArrayDataInput | newDataInput(byte[] bytes, int start)
Returns a new |
| public static ByteArrayDataInput | newDataInput(ByteArrayInputStream byteArrayInputStream)
Returns a new |
| public static ByteArrayDataOutput | |
| public static ByteArrayDataOutput | newDataOutput(int size)
Returns a new |
| public static ByteArrayDataOutput | newDataOutput(ByteArrayOutputStream byteArrayOutputStream)
Returns a new |
| public static OutputStream | |
| public static int | Returns: the number of bytes readthe input stream to read from in, byte[] the buffer into which the data is read b, int an int specifying the offset into the data off, int an int specifying the number of bytes to read len)Reads some bytes from an input stream and stores them into the buffer array |
| public static <T extends @Nullable Object> T | Returns: the result of the byte processorthe input stream to process input, ByteProcessor<T> the object to which to pass the bytes of the stream processor)Process the bytes of the given input stream using the given processor. |
| public static void | readFully(InputStream
the input stream to read from. in, byte[] the buffer into which the data is read. b)Attempts to read enough bytes from the stream to fill the given byte array, with the same
behavior as |
| public static void | readFully(InputStream
the input stream to read from. in, byte[] the buffer into which the data is read. b, int an int specifying the offset into the data. off, int an int specifying the number of bytes to read. len)Attempts to read |
| public static void | skipFully(InputStream
the input stream to read from in, long the number of bytes to skip n)Discards |
| private static long | skipSafely(InputStream in, long n)
Attempts to skip up to |
| pack-priv static long | |
| public static byte[] | Returns: a byte array containing all the bytes from the streamthe input stream to read from in)Reads all bytes from an input stream into a byte array. |
| pack-priv static byte[] | toByteArray(InputStream in, long expectedSize)
Reads all bytes from an input stream into a byte array. |
| private static byte[] | toByteArrayInternal(InputStream in, Queue<byte[]> bufs, int totalLen)
Returns a byte array containing the bytes from the buffers already in |