com.caucho.quercus.lib.file
Interface BinaryStream

All Known Subinterfaces:
BinaryInput, BinaryOutput, SocketInputOutput
All Known Implementing Classes:
AbstractBinaryInput, AbstractBinaryInputOutput, AbstractBinaryOutput, BufferedBinaryInputOutput, FileInput, FileInputOutput, FileOutput, HttpInputOutput, PhpBinaryInput, PhpBinaryOutput, PhpStderr, PhpStdin, PhpStdout, PopenInput, PopenOutput, ProcOpenInput, ProcOpenOutput, ReadStreamInput, TcpInputOutput, UdpInputOutput, WrappedStream, WriteStreamOutput, ZipEntryInputStream, ZlibInputStream, ZlibOutputStream

public interface BinaryStream

Interface for a Quercus stream


Field Summary
static int SEEK_CUR
           
static int SEEK_END
           
static int SEEK_SET
           
 
Method Summary
 void close()
          All streams can be closed.
 long getPosition()
          Tells the position in the stream.
 boolean isEOF()
          Returns true if end-of-file has been reached
 long seek(long offset, int whence)
          Seek according to offset and whence.
 boolean setPosition(long offset)
          Sets the current position in the stream.
 Value stat()
          Returns an array filled with stat information.
 

Field Detail

SEEK_SET

static final int SEEK_SET
See Also:
Constant Field Values

SEEK_CUR

static final int SEEK_CUR
See Also:
Constant Field Values

SEEK_END

static final int SEEK_END
See Also:
Constant Field Values
Method Detail

close

void close()
All streams can be closed.


getPosition

long getPosition()
Tells the position in the stream. The valid range for a stream position is 0 to Long.MAX_VALUE, so a negative number can't be a valid stream position.


setPosition

boolean setPosition(long offset)
Sets the current position in the stream. Returns true on success, false otherwise.


seek

long seek(long offset,
          int whence)
Seek according to offset and whence. For fseek() compatibility in wrapped streams.


isEOF

boolean isEOF()
Returns true if end-of-file has been reached


stat

Value stat()
Returns an array filled with stat information. Mainly for wrapped stream functionality.