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
IOException
public int read(ByteBuffer out)
public ByteBuffer slice(int length) throws EOFException
EOFException
public List<ByteBuffer> sliceBuffers(long length) throws EOFException
EOFException
public ByteBufferInputStream sliceStream(long length) throws EOFException
EOFException
public List<ByteBuffer> remainingBuffers()
public ByteBufferInputStream remainingStream()
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public long skip(long n)
skip
in class InputStream
public int available()
available
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
Copyright © 2020 The Apache Software Foundation. All rights reserved.