public interface BinaryInput extends BinaryStream
SEEK_CUR, SEEK_END, SEEK_SET
Modifier and Type | Method and Description |
---|---|
StringValue |
appendTo(StringValue builder)
Appends to a string builder.
|
void |
close()
Closes the stream.
|
void |
closeRead()
Closes the stream for reading
|
int |
getAvailable() |
java.io.InputStream |
getInputStream()
Returns an InputStream to the input.
|
long |
getPosition()
Returns the current location in the stream
|
BinaryInput |
openCopy()
Opens a new copy.
|
int |
read()
Reads the next byte, returning -1 on eof.
|
int |
read(byte[] buffer,
int offset,
int length)
Reads into a buffer, returning -1 on eof.
|
StringValue |
read(int length)
Reads a Binary string.
|
StringValue |
readLine(long length)
Reads a line from the buffer.
|
boolean |
readOptionalLinefeed()
Reads the optional linefeed character from a \r\n
|
boolean |
setPosition(long offset)
Sets the current location in the stream
|
void |
unread()
Unreads the last byte.
|
isEOF, seek, stat
java.io.InputStream getInputStream()
BinaryInput openCopy() throws java.io.IOException
java.io.IOException
int getAvailable() throws java.io.IOException
java.io.IOException
int read() throws java.io.IOException
java.io.IOException
void unread() throws java.io.IOException
java.io.IOException
int read(byte[] buffer, int offset, int length) throws java.io.IOException
java.io.IOException
StringValue read(int length) throws java.io.IOException
java.io.IOException
boolean readOptionalLinefeed() throws java.io.IOException
java.io.IOException
StringValue readLine(long length) throws java.io.IOException
java.io.IOException
StringValue appendTo(StringValue builder) throws java.io.IOException
java.io.IOException
long getPosition()
getPosition
in interface BinaryStream
boolean setPosition(long offset)
setPosition
in interface BinaryStream
void close()
close
in interface BinaryStream
void closeRead()