|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.quercus.env.Value
com.caucho.quercus.env.ResourceValue
com.caucho.quercus.resources.StreamResource
com.caucho.quercus.resources.StreamReadWrite
public class StreamReadWrite
Represents read/write stream
| Field Summary |
|---|
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
StreamReadWrite(Env env)
|
|
StreamReadWrite(Env env,
ReadStream is,
WriteStream os)
|
|
| Method Summary | |
|---|---|
void |
cleanup()
Implements the EnvCleanup interface. |
void |
close()
Closes the stream. |
void |
closeRead()
Closes the stream for reading. |
void |
closeWrite()
Closes the stream for writing |
void |
flush()
Flushes the output |
long |
getPosition()
Returns the current location in the file. |
protected void |
init(ReadStream is,
WriteStream os)
|
boolean |
isEOF()
Returns true on the end of file. |
void |
print(char ch)
prints |
void |
print(java.lang.String s)
prints |
int |
read()
Reads the next byte, returning -1 on eof. |
int |
read(byte[] buffer,
int offset,
int length)
Reads a buffer, returning -1 on eof. |
int |
readLine(char[] buffer)
Reads a line from the stream into a buffer. |
StringValue |
readLine(Env env)
Reads a line from the buffer. |
boolean |
readOptionalLinefeed()
Reads the optional linefeed character from a \r\n |
int |
write(byte[] buffer,
int offset,
int length)
Writes to a buffer. |
| Methods inherited from class com.caucho.quercus.env.ResourceValue |
|---|
printRImpl, toKey, toString, varDumpImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StreamReadWrite(Env env)
public StreamReadWrite(Env env,
ReadStream is,
WriteStream os)
| Method Detail |
|---|
protected void init(ReadStream is,
WriteStream os)
public int read()
throws java.io.IOException
read in class StreamResourcejava.io.IOException
public int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class StreamResourcejava.io.IOException
public boolean readOptionalLinefeed()
throws java.io.IOException
readOptionalLinefeed in class StreamResourcejava.io.IOException
public StringValue readLine(Env env)
throws java.io.IOException
readLine in class StreamResourcejava.io.IOExceptionpublic int readLine(char[] buffer)
public int write(byte[] buffer,
int offset,
int length)
throws java.io.IOException
write in class StreamResourcejava.io.IOException
public void print(char ch)
throws java.io.IOException
print in class StreamResourcejava.io.IOException
public void print(java.lang.String s)
throws java.io.IOException
print in class StreamResourcejava.io.IOExceptionpublic boolean isEOF()
isEOF in class StreamResourcepublic void flush()
flush in class StreamResourcepublic long getPosition()
getPosition in class StreamResourcepublic void closeRead()
closeRead in class StreamResourcepublic void closeWrite()
closeWrite in class StreamResourcepublic void close()
close in class StreamResourcepublic void cleanup()
cleanup in interface EnvCleanupcleanup in class ResourceValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||