public abstract static class ByteChannel.BufferInputStream extends InputStream
| Constructor and Description |
|---|
ByteChannel.BufferInputStream() |
| Modifier and Type | Method and Description |
|---|---|
abstract int |
available() |
abstract void |
close() |
abstract void |
mark(int readLimit) |
abstract int |
read() |
abstract int |
read(byte[] b) |
abstract int |
read(byte[] b,
int off,
int len) |
abstract int |
read(OutputStream out)
Reads some bytes from the input stream and writes them into the specified output stream.
|
long |
readAll(OutputStream out)
Reads all the bytes returned by the input stream and writes them into the specified
output stream.
Calling this method has the same effect as calling: |
abstract void |
reset() |
abstract long |
skip(long n) |
markSupportedpublic abstract int read(@NotNull
OutputStream out)
throws IOException
out - the output stream.-1 if there is no
more data because the end of the stream has been reached.IOException - if an I/O error occurs. In particular, an
IOException may be thrown if the output stream
has been closed.public abstract int read()
read in class InputStreampublic abstract int read(@NotNull
byte[] b)
read in class InputStreampublic abstract int read(@NotNull
byte[] b,
int off,
int len)
read in class InputStreampublic abstract long skip(long n)
skip in class InputStreampublic abstract int available()
available in class InputStreampublic abstract void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic abstract void mark(int readLimit)
mark in class InputStreampublic abstract void reset()
reset in class InputStreampublic long readAll(@NotNull
OutputStream out)
throws IOException
while (inputStream.read(outputStream) > 0) {
// Keep looping
}
out - the output stream.IOException - if an I/O error occurs. In particular, an
IOException may be thrown if the output stream
has been closed.