|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.lib.file.WrappedStream
public class WrappedStream
A stream that has its operations mediated by a Quercus object.
| Field Summary |
|---|
| Fields inherited from interface com.caucho.quercus.lib.file.BinaryStream |
|---|
SEEK_CUR, SEEK_END, SEEK_SET |
| Constructor Summary | |
|---|---|
WrappedStream(Env env,
QuercusClass qClass,
StringValue path,
StringValue mode,
LongValue options)
|
|
| Method Summary | |
|---|---|
StringValue |
appendTo(StringValue builder)
Appends to a string builder. |
void |
close()
Closes the stream. |
void |
closeRead()
Closes the stream for reading |
void |
closeWrite()
Closes the stream for writing |
void |
flush()
Flushes the output |
java.io.InputStream |
getInputStream()
Returns an InputStream to the input. |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream. |
long |
getPosition()
Tells the position in the stream |
boolean |
isEOF()
Returns true if end-of-file has been reached |
BinaryInput |
openCopy()
Opens a new copy. |
void |
print(char v)
Prints a string to a file. |
void |
print(java.lang.String v)
Prints a string to a file. |
int |
read()
Reads a character from a file, returning -1 on EOF. |
int |
read(byte[] buffer,
int offset,
int length)
Reads into a buffer, returning -1 on eof. |
int |
read(char[] 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 a file, returning null on EOF. |
boolean |
readOptionalLinefeed()
Reads the optional linefeed character from a \r\n |
long |
seek(long offset,
int whence)
Seek according to offset and whence. |
void |
setEncoding(java.lang.String encoding)
Sets the current read encoding. |
boolean |
setPosition(long offset)
Sets the position. |
Value |
stat()
Returns an array filled with stat information. |
void |
unread()
Unread a character. |
void |
write(byte[] buffer,
int offset,
int length)
Writes a buffer. |
int |
write(java.io.InputStream is,
int length)
Writes to a stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedStream(Env env,
QuercusClass qClass,
StringValue path,
StringValue mode,
LongValue options)
| Method Detail |
|---|
public java.io.InputStream getInputStream()
BinaryInput
getInputStream in interface BinaryInputpublic java.io.OutputStream getOutputStream()
BinaryOutput
getOutputStream in interface BinaryOutput
public BinaryInput openCopy()
throws java.io.IOException
openCopy in interface BinaryInputjava.io.IOException
public void setEncoding(java.lang.String encoding)
throws java.io.UnsupportedEncodingException
setEncoding in interface BinaryInputencoding - name of the read encoding
java.io.UnsupportedEncodingExceptionpublic void closeRead()
BinaryInput
closeRead in interface BinaryInputpublic void closeWrite()
BinaryOutput
closeWrite in interface BinaryOutputpublic void close()
BinaryInput
close in interface BinaryInputclose in interface BinaryOutputclose in interface BinaryStream
public int read()
throws java.io.IOException
read in interface BinaryInputjava.io.IOException
public void unread()
throws java.io.IOException
unread in interface BinaryInputjava.io.IOException
public int read(byte[] buffer,
int offset,
int length)
BinaryInput
read in interface BinaryInput
public int read(char[] buffer,
int offset,
int length)
BinaryInput
read in interface BinaryInputpublic StringValue appendTo(StringValue builder)
appendTo in interface BinaryInput
public StringValue read(int length)
throws java.io.IOException
read in interface BinaryInputjava.io.IOException
public boolean readOptionalLinefeed()
throws java.io.IOException
readOptionalLinefeed in interface BinaryInputjava.io.IOException
public StringValue readLine(long length)
throws java.io.IOException
readLine in interface BinaryInputjava.io.IOException
public void write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
BinaryOutput
write in interface BinaryOutputjava.io.IOException
public int write(java.io.InputStream is,
int length)
write in interface BinaryOutput
public void print(char v)
throws java.io.IOException
print in interface BinaryOutputjava.io.IOException
public void print(java.lang.String v)
throws java.io.IOException
print in interface BinaryOutputjava.io.IOExceptionpublic boolean isEOF()
isEOF in interface BinaryStreampublic long getPosition()
getPosition in interface BinaryInputgetPosition in interface BinaryStreampublic boolean setPosition(long offset)
setPosition in interface BinaryInputsetPosition in interface BinaryStream
public long seek(long offset,
int whence)
BinaryStream
seek in interface BinaryStream
public void flush()
throws java.io.IOException
BinaryOutput
flush in interface BinaryOutputjava.io.IOExceptionpublic Value stat()
BinaryStream
stat in interface BinaryStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||