public static class ByteBufferStreams.Input extends InputStream implements DataInput
| Constructor and Description |
|---|
Input(ByteBuffer source)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
read(ByteBuffer dest)
Additional ByteBuffer primitive read.
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine()
Deprecated.
|
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
reset() |
void |
setBuffer(ByteBuffer source)
Set the underlying buffer.
|
long |
skip(long n) |
int |
skipBytes(int n) |
public Input(ByteBuffer source)
source - initial buffer. null allowed.public void setBuffer(ByteBuffer source)
source - new bufferpublic int read(byte[] b)
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 close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic void mark(int readlimit)
mark in class InputStreampublic void reset()
reset in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read()
throws IOException
read in class InputStreamIOExceptionpublic void readFully(byte[] b)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws IOException
readFully in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOException@Deprecated public String readLine()
public String readUTF() throws IOException
readUTF in interface DataInputIOExceptionpublic void read(ByteBuffer dest) throws IOException
dest - destination byte bufferIOException - on errorCopyright © 2020. All rights reserved.