| Sgss_File_Stream_Read_Range | Represents a read-only stream with the range limited |
|
$_file
File of the stream |
|
$_handle
Stream resource |
|
$_mode
Mode with which the stream being opened |
|
__construct (string|Sgss_File $file, [string|null $mode = null])
The constructor |
|
__destruct ()
The destructor |
boolean |
close ()
Destructs the stream resource |
boolean |
eof ()
Determines the pointer reaches the end of this stream |
string|null |
get (int $length)
Reads the contents and moves the pointer of this stream by the specified length of bytes |
string|null |
getAll ()
Reads all the contents of this stream |
Sgss_File_Reader |
getReader ()
Creates and returns the reader of this stream |
boolean |
move (int $offset, int $length)
Moves the pointer of this stream by the specified length of bytes |
int |
position ()
Returns the current pointer position of this stream in byte |
Sgss_File_Stream_Read |
range ([int $offset = 0], [int|null $limit = null])
Returns the stream object whose range is limited by the specified parameters |
boolean |
reset ()
Moves the pointer of this stream to the first |
int |
seek (int $position)
Moves the pointer of this stream to the specified position |
int |
size ()
Returns the size of this stream in byte |
File of the stream
protected Sgss_File $_file
Stream resource
protected resource $_handle
Mode with which the stream being opened
protected string $_mode
The constructor
string|Sgss_File $file
File of the stream
string|null $mode
Mode to open the file with
When any error occurred while constructing the stream resource
The constructor
public __construct (string|Sgss_File $file, [string|null $mode = null])
The destructor
public __destruct ()
Destructs the stream resource
Destructs the stream resource
public boolean close ()
Determines the pointer reaches the end of this stream
Determines the pointer reaches the end of this stream
public boolean eof ()
Reads the contents and moves the pointer of this stream by the specified length of bytes
int $length
Length in byte to read
Reads the contents and moves the pointer of this stream by the specified length of bytes
public string|null get (int $length)
Reads all the contents of this stream
Reads all the contents of this stream
public string|null getAll ()
Creates and returns the reader of this stream
public Sgss_File_Reader getReader ()
Moves the pointer of this stream by the specified length of bytes
int $length
Length in byte by which the pointer moves
$offset
Moves the pointer of this stream by the specified length of bytes
public boolean move (int $offset, int $length)
Returns the current pointer position of this stream in byte
Returns the current pointer position of this stream in byte
public int position ()
Returns the stream object whose range is limited by the specified parameters
int $offset
Beginning of the stream in byte
int|null $limit
Limit of the stream in byte
Returns the stream object whose range is limited by the specified parameters
public Sgss_File_Stream_Read range ([int $offset = 0], [int|null $limit = null])
Moves the pointer of this stream to the first
Moves the pointer of this stream to the first
public boolean reset ()
Moves the pointer of this stream to the specified position
int $position
Position in byte to which the pointer moves
Moves the pointer of this stream to the specified position
public int seek (int $position)
Returns the size of this stream in byte
Returns the size of this stream in byte
public int size ()