Sgss_File_Stream_Read
+ Sgss_File_Stream_Read_Range
|
$_limit
Limit of this stream in byte |
|
$_offset
Beginning of this stream in byte |
|
__construct (string|Sgss_File $file, [string|null $mode = null], [int $offset = 0], [int|null $limit = null])
The constructor |
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 |
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 |
Limit of this stream in byte
protected int $_limit
Beginning of this stream in byte
protected int $_offset
The constructor
string|Sgss_File $file
File of the stream
string|null $mode
Mode to open the file with
int $offset
Beginning of the stream in byte
int|null $limit
Limit of the stream in byte
The constructor
public __construct (string|Sgss_File $file, [string|null $mode = null], [int $offset = 0], [int|null $limit = null])
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 ()
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 ()