java.io.Closeable, java.lang.AutoCloseablepublic final class ByteBufferInputStream
extends java.io.InputStream
mark(int).| Constructor | Description |
|---|---|
ByteBufferInputStream(int size,
java.nio.ByteBuffer byteBuffer) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
available() |
|
void |
close() |
After the stream is closed, set the local reference to the byte
buffer to null; this guarantees that future attempts to use
stream methods will fail.
|
boolean |
hasRemaining() |
Check if there is data left.
|
boolean |
isOpen() |
Is the stream open?
|
void |
mark(int readlimit) |
|
boolean |
markSupported() |
|
int |
position() |
Get the current buffer position.
|
int |
read() |
|
int |
read(byte[] b,
int offset,
int length) |
Read in data.
|
void |
reset() |
|
long |
skip(long offset) |
|
java.lang.String |
toString() |
public ByteBufferInputStream(int size,
java.nio.ByteBuffer byteBuffer)
public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.InputStreampublic boolean isOpen()
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long offset)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic int available()
available in class java.io.InputStreampublic int position()
public boolean hasRemaining()
public void mark(int readlimit)
mark in class java.io.InputStreampublic void reset()
throws java.io.IOException
reset in class java.io.InputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class java.io.InputStreampublic int read(byte[] b,
int offset,
int length)
throws java.io.IOException
read in class java.io.InputStreamb - destination buffer.offset - offset within the buffer.length - length of bytes to read.java.io.EOFException - if the position is negativejava.lang.IndexOutOfBoundsException - if there isn't space for the
amount of data requested.java.lang.IllegalArgumentException - other arguments are invalid.java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.