|
||||||||||
| 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.lib.file.FileValue
com.caucho.quercus.lib.file.FileReadValue
public class FileReadValue
Represents a Quercus open file
| Field Summary |
|---|
| Fields inherited from class com.caucho.quercus.env.Value |
|---|
L, NULL_ARGS, NULL_VALUE_ARRAY, SCALAR_V |
| Constructor Summary | |
|---|---|
FileReadValue(Path path)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the file. |
long |
getLength()
Returns the number of bytes available to be read, 0 if no known. |
long |
getPosition()
Returns the current location in the file. |
boolean |
isEOF()
Returns true on the EOF. |
int |
read()
Reads a character from a file, returning -1 on EOF. |
int |
read(byte[] buffer,
int offset,
int length)
Reads a buffer from a file, returning -1 on EOF. |
StringValue |
readLine(Env env)
Reads a line from a file, returning null on EOF. |
boolean |
readOptionalLinefeed()
Reads the optional linefeed character from a \r\n |
java.lang.String |
toString()
Converts to a string. |
void |
writeToStream(java.io.OutputStream os,
int length)
Read a maximum of length bytes from the file and write them to the outputStream. |
| Methods inherited from class com.caucho.quercus.lib.file.FileValue |
|---|
getPath, print |
| Methods inherited from class com.caucho.quercus.resources.StreamResource |
|---|
closeRead, closeWrite, flush, print, write |
| Methods inherited from class com.caucho.quercus.env.ResourceValue |
|---|
cleanup, printRImpl, toKey, varDumpImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileReadValue(Path path)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public long getLength()
public int read()
throws java.io.IOException
read in class FileValuejava.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 void writeToStream(java.io.OutputStream os,
int length)
throws java.io.IOException
FileValue
writeToStream in class FileValueos - the OutputStreamlength - the maximum number of bytes to read
java.io.IOException
public StringValue readLine(Env env)
throws java.io.IOException
readLine in class FileValuejava.io.IOExceptionpublic boolean isEOF()
isEOF in class StreamResourcepublic long getPosition()
getPosition in class StreamResourcepublic void close()
close in class FileValuepublic java.lang.String toString()
toString in class FileValueenv -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||