| java.lang.Object java.io.OutputStream com.caucho.quercus.lib.file.AbstractBinaryOutput com.caucho.quercus.lib.file.FileInputOutput
Method Summary | |
public StringValue | appendTo(StringValue builder) Appends to a string builder. | public void | cleanup() Implements the EnvCleanup interface. | public void | close() Closes the file. | public void | closeRead() Closes the file for reading. | public void | closeWrite() Closes the file for writing. | public void | flush() Flushes the output. | public InputStream | getInputStream() Returns the read stream. | public OutputStream | getOutputStream() Returns the write stream. | public Path | getPath() Returns the path. | public long | getPosition() Returns the current location in the file. | public boolean | isEOF() Returns true on the EOF. | public boolean | lock(boolean shared, boolean block) Lock the shared advisory lock. | public BinaryInput | openCopy() Opens a copy. | public void | print(char v) Prints a string to a file. | public void | print(String v) Prints a string to a file. | public int | read() Reads a character from a file, returning -1 on EOF. | public int | read(byte[] buffer, int offset, int length) Reads a buffer from a file, returning -1 on EOF. | public int | read(char[] buffer, int offset, int length) Reads a buffer from a file, returning -1 on EOF. | public StringValue | read(int length) Reads a Binary string. | public StringValue | readLine(long length) Reads a line from the buffer. | public boolean | readOptionalLinefeed() | public long | seek(long offset, int whence) | public void | setEncoding(String encoding) Sets the current read encoding. | public boolean | setPosition(long offset) | public Value | stat() | public String | toString() Converts to a string. | public boolean | unlock() Unlock the advisory lock. | public void | unread() Unread a character. | public void | write(byte[] buffer, int offset, int length) Writes a buffer to a file. | public void | write(int ch) Writes a buffer to a file. |
FileInputOutput | public FileInputOutput(Env env, Path path, boolean append, boolean truncate) throws IOException(Code) | | |
FileInputOutput | public FileInputOutput(Env env, Path path, boolean append, boolean truncate, boolean temporary) throws IOException(Code) | | |
cleanup | public void cleanup()(Code) | | Implements the EnvCleanup interface.
|
close | public void close()(Code) | | Closes the file.
|
closeRead | public void closeRead()(Code) | | Closes the file for reading.
|
closeWrite | public void closeWrite()(Code) | | Closes the file for writing.
|
getPath | public Path getPath()(Code) | | Returns the path.
|
getPosition | public long getPosition()(Code) | | Returns the current location in the file.
|
isEOF | public boolean isEOF()(Code) | | Returns true on the EOF.
|
lock | public boolean lock(boolean shared, boolean block)(Code) | | Lock the shared advisory lock.
|
read | public int read() throws IOException(Code) | | Reads a character from a file, returning -1 on EOF.
|
read | public int read(byte[] buffer, int offset, int length) throws IOException(Code) | | Reads a buffer from a file, returning -1 on EOF.
|
read | public int read(char[] buffer, int offset, int length) throws IOException(Code) | | Reads a buffer from a file, returning -1 on EOF.
|
readOptionalLinefeed | public boolean readOptionalLinefeed() throws IOException(Code) | | Reads the optional linefeed character from a \r\n
|
seek | public long seek(long offset, int whence)(Code) | | |
setEncoding | public void setEncoding(String encoding) throws UnsupportedEncodingException(Code) | | Sets the current read encoding. The encoding can either be a
Java encoding name or a mime encoding.
Parameters: encoding - name of the read encoding |
setPosition | public boolean setPosition(long offset)(Code) | | Sets the current location in the stream
|
toString | public String toString()(Code) | | Converts to a string.
Parameters: env - |
unlock | public boolean unlock()(Code) | | Unlock the advisory lock.
|
write | public void write(byte[] buffer, int offset, int length) throws IOException(Code) | | Writes a buffer to a file.
|
|
|