public abstract class BufferedBinaryInputOutput extends AbstractBinaryInputOutput
_env, _isEOF, _isTimeout, _lineReaderSEEK_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, writeprotected BufferedBinaryInputOutput(Env env)
public void init(ReadStream is, WriteStream os)
public void setEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic void unread()
throws java.io.IOException
unread in interface BinaryInputunread in class AbstractBinaryInputOutputjava.io.IOExceptionpublic int getAvailable()
throws java.io.IOException
getAvailable in interface BinaryInputgetAvailable in class AbstractBinaryInputOutputjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in interface BinaryInputread in class AbstractBinaryInputOutputjava.io.IOExceptionpublic int read(char[] buffer,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void writeToStream(java.io.OutputStream os,
int length)
throws java.io.IOException
java.io.IOExceptionpublic StringValue readLine(long length) throws java.io.IOException
readLine in interface BinaryInputreadLine in class AbstractBinaryInputOutputjava.io.IOExceptionpublic long getPosition()
getPosition in interface BinaryInputgetPosition in interface BinaryStreamgetPosition in class AbstractBinaryInputOutputpublic boolean setPosition(long offset)
setPosition in interface BinaryInputsetPosition in interface BinaryStreamsetPosition in class AbstractBinaryInputOutputpublic Value stat()
BinaryStreamstat in interface BinaryStreamstat in class AbstractBinaryInputOutputpublic java.lang.String toString()
toString in class AbstractBinaryInputOutput