public abstract class BufferedBinaryInputOutput extends AbstractBinaryInputOutput
_env, _isEOF, _isTimeout, _lineReader
SEEK_CUR, SEEK_END, SEEK_SET
Modifier | Constructor and Description |
---|---|
protected |
BufferedBinaryInputOutput(Env env) |
Modifier and Type | Method and Description |
---|---|
int |
getAvailable() |
long |
getPosition()
Returns the current location in the file.
|
void |
init(ReadStream is,
WriteStream os) |
int |
read()
Reads a character from a file, returning -1 on EOF.
|
int |
read(char[] buffer,
int offset,
int length)
Reads a buffer from a file, returning -1 on EOF.
|
StringValue |
readLine(long length)
Reads a line from a file, returning null on EOF.
|
void |
setEncoding(java.lang.String encoding) |
boolean |
setPosition(long offset)
Sets the current location in the file.
|
Value |
stat()
Returns an array filled with stat information.
|
java.lang.String |
toString()
Converts to a string.
|
void |
unread()
Unread the last byte.
|
void |
writeToStream(java.io.OutputStream os,
int length) |
appendTo, close, closeRead, closeWrite, flush, getEnv, getInputStream, getOutputStream, getResourceType, init, isEOF, isTimeout, openCopy, print, print, read, read, readOptionalLinefeed, seek, setTimeout, toJavaObject, write, write, write
protected BufferedBinaryInputOutput(Env env)
public void init(ReadStream is, WriteStream os)
public void setEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public void unread() throws java.io.IOException
unread
in interface BinaryInput
unread
in class AbstractBinaryInputOutput
java.io.IOException
public int getAvailable() throws java.io.IOException
getAvailable
in interface BinaryInput
getAvailable
in class AbstractBinaryInputOutput
java.io.IOException
public int read() throws java.io.IOException
read
in interface BinaryInput
read
in class AbstractBinaryInputOutput
java.io.IOException
public int read(char[] buffer, int offset, int length) throws java.io.IOException
java.io.IOException
public void writeToStream(java.io.OutputStream os, int length) throws java.io.IOException
java.io.IOException
public StringValue readLine(long length) throws java.io.IOException
readLine
in interface BinaryInput
readLine
in class AbstractBinaryInputOutput
java.io.IOException
public long getPosition()
getPosition
in interface BinaryInput
getPosition
in interface BinaryStream
getPosition
in class AbstractBinaryInputOutput
public boolean setPosition(long offset)
setPosition
in interface BinaryInput
setPosition
in interface BinaryStream
setPosition
in class AbstractBinaryInputOutput
public Value stat()
BinaryStream
stat
in interface BinaryStream
stat
in class AbstractBinaryInputOutput
public java.lang.String toString()
toString
in class AbstractBinaryInputOutput