public class ByteBufferInputStream extends InputStream
ByteBuffer
data as an InputStream
.Constructor and Description |
---|
ByteBufferInputStream(List<ByteBuffer> buffers) |
Modifier and Type | Method and Description |
---|---|
int |
read() |
int |
read(byte[] b,
int off,
int len) |
ByteBuffer |
readBuffer(int length)
Read a buffer from the input without copying, if possible.
|
available, close, mark, markSupported, read, reset, skip
public ByteBufferInputStream(List<ByteBuffer> buffers)
public int read() throws IOException
read
in class InputStream
EOFException
- if EOF is reached.IOException
InputStream.read()
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
EOFException
- if EOF is reached before reading all the bytes.IOException
InputStream.read(byte[], int, int)
public ByteBuffer readBuffer(int length) throws IOException
EOFException
- if EOF is reached before reading all the bytes.IOException
Copyright © 2009–2016 The Apache Software Foundation. All rights reserved.