public final class BufferedInputPart extends BufferedInput
BufferedInput
for parsing of size-tagged packets.buffer, EMPTY_BYTE_ARRAY, limit, markLimit, markPosition, position, totalPositionBase
Constructor and Description |
---|
BufferedInputPart() |
BufferedInputPart(BufferedInput in,
long length) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
int |
read(byte[] b,
int off,
int len) |
protected int |
readData()
This method is invoked when input methods need more bytes to read data.
|
void |
resetInput() |
void |
rewind(long n)
Rewinds specified number of bytes.
|
void |
setInput(BufferedInput in,
long length) |
long |
skip(long n) |
checkEOB, checkRewind, mark, mark, markSupported, needData, read, read, readBoolean, readByte, readByteArray, readChar, readCompactInt, readCompactLong, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readObject, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTFChar, readUTFString, reset, seek, skipBytes, throwEOFException, totalPosition
public BufferedInputPart()
public BufferedInputPart(BufferedInput in, long length)
public void setInput(BufferedInput in, long length)
public void resetInput()
public void close()
close
in interface Closeable
close
in interface ObjectInput
close
in interface AutoCloseable
close
in class InputStream
public int available() throws IOException
available
in interface ObjectInput
available
in class BufferedInput
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in interface ObjectInput
read
in class BufferedInput
IOException
public long skip(long n) throws IOException
skip
in interface ObjectInput
skip
in class BufferedInput
IOException
public void rewind(long n)
BufferedInput
rewind
in class BufferedInput
n
- the number of bytes to rewindprotected int readData() throws IOException
BufferedInput
-1
if no bytes can be read because the end of the stream has been reached.
This method may block if needed.
This method is allowed to update buffer, position, limit and totalPositionBase fields as needed.
This method shall never throw an EOFException
.
readData
in class BufferedInput
-1
if there is no more data because the end of the stream has been reachedIOException
- if an I/O error occursCopyright © 2014 Devexperts. All Rights Reserved.