public class ByteBufferInputStream extends InputStream
| Constructor and Description |
|---|
ByteBufferInputStream(ByteBuffer buffer)
Deprecated.
Will be removed in 2.0.0; Use
wrap(ByteBuffer...) instead |
ByteBufferInputStream(ByteBuffer buffer,
int offset,
int count)
Deprecated.
Will be removed in 2.0.0; Use
wrap(ByteBuffer...) instead |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
mark(int readlimit) |
boolean |
markSupported() |
long |
position() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
int |
read(ByteBuffer out) |
List<ByteBuffer> |
remainingBuffers() |
ByteBufferInputStream |
remainingStream() |
void |
reset() |
long |
skip(long n) |
void |
skipFully(long n) |
ByteBuffer |
slice(int length) |
List<ByteBuffer> |
sliceBuffers(long length) |
ByteBufferInputStream |
sliceStream(long length) |
ByteBuffer |
toByteBuffer()
Deprecated.
Will be removed in 2.0.0; Use
slice(int) instead |
static ByteBufferInputStream |
wrap(ByteBuffer... buffers) |
static ByteBufferInputStream |
wrap(List<ByteBuffer> buffers) |
close, read@Deprecated public ByteBufferInputStream(ByteBuffer buffer)
wrap(ByteBuffer...) insteadbuffer - the buffer to be wrapped in this input stream@Deprecated public ByteBufferInputStream(ByteBuffer buffer, int offset, int count)
wrap(ByteBuffer...) insteadbuffer - the buffer to be wrapped in this input streamoffset - the offset of the data in the buffercount - the number of bytes to be read from the bufferpublic static ByteBufferInputStream wrap(ByteBuffer... buffers)
public static ByteBufferInputStream wrap(List<ByteBuffer> buffers)
@Deprecated public ByteBuffer toByteBuffer()
slice(int) insteadpublic long position()
public void skipFully(long n)
throws IOException
IOExceptionpublic int read(ByteBuffer out)
public ByteBuffer slice(int length) throws EOFException
EOFExceptionpublic List<ByteBuffer> sliceBuffers(long length) throws EOFException
EOFExceptionpublic ByteBufferInputStream sliceStream(long length) throws EOFException
EOFExceptionpublic List<ByteBuffer> remainingBuffers()
public ByteBufferInputStream remainingStream()
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
skip in class InputStreampublic int available()
available in class InputStreampublic void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreamCopyright © 2018 The Apache Software Foundation. All rights reserved.