Zend Framework
1.12
|
Public Member Functions | |
seek ($offset, $whence=SEEK_SET) | |
Sets the file position indicator and advances the file pointer. | |
tell () | |
Get file position. | |
flush () | |
Flush output. | |
lock ($lockType, $nonBlockinLock=false) | |
Lock file. | |
unlock () | |
Unlock file. | |
readByte () | |
Reads a byte from the current position in the file and advances the file pointer. | |
writeByte ($byte) | |
Writes a byte to the end of the file. | |
readBytes ($num) | |
Read num bytes from the current position in the file and advances the file pointer. | |
writeBytes ($data, $num=null) | |
Writes num bytes of data (all, if $num===null) to the end of the string. | |
readInt () | |
Reads an integer from the current position in the file and advances the file pointer. | |
writeInt ($value) | |
Writes an integer to the end of file. | |
readLong () | |
Returns a long integer from the current position in the file and advances the file pointer. | |
writeLong ($value) | |
Writes long integer to the end of file. | |
readLong32Bit () | |
Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms). | |
writeLong32Bit ($value) | |
Writes long integer to the end of file (32-bit platforms implementation) | |
readVInt () | |
Returns a variable-length integer from the current position in the file and advances the file pointer. | |
writeVInt ($value) | |
Writes a variable-length integer to the end of file. | |
readString () | |
Reads a string from the current position in the file and advances the file pointer. | |
writeString ($str) | |
Writes a string to the end of file. | |
readBinary () | |
Reads binary data from the current position in the file and advances the file pointer. | |
Protected Member Functions | |
_fread ($length=1) | |
Reads $length number of bytes at the current position in the file and advances the file pointer. | |
_fwrite ($data, $length=null) | |
Writes $length number of bytes (all, if $length===null) to the end of the file. | |
|
abstractprotected |
Reads $length number of bytes at the current position in the file and advances the file pointer.
integer | $length |
|
abstractprotected |
Writes $length number of bytes (all, if $length===null) to the end of the file.
string | $data | |
integer | $length |
|
abstract |
Flush output.
Returns true on success or false on failure.
|
abstract |
Lock file.
Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock)
integer | $lockType |
readBinary | ( | ) |
Reads binary data from the current position in the file and advances the file pointer.
readByte | ( | ) |
Reads a byte from the current position in the file and advances the file pointer.
readBytes | ( | $num | ) |
Read num bytes from the current position in the file and advances the file pointer.
integer | $num |
readInt | ( | ) |
Reads an integer from the current position in the file and advances the file pointer.
readLong | ( | ) |
Returns a long integer from the current position in the file and advances the file pointer.
Zend_Search_Lucene_Exception |
Check, that we work in 64-bit mode. fseek() uses long for offset. Thus, largest index segment file size in 32bit mode is 2Gb
readLong32Bit | ( | ) |
Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms).
Zend_Search_Lucene_Exception |
readString | ( | ) |
Reads a string from the current position in the file and advances the file pointer.
This implementation supports only Basic Multilingual Plane (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support "supplementary characters" (characters whose code points are greater than 0xFFFF) Java 2 represents these characters as a pair of char (16-bit) values, the first from the high-surrogates range (0xD800-0xDBFF), the second from the low-surrogates range (0xDC00-0xDFFF). Then they are encoded as usual UTF-8 characters in six bytes. Standard UTF-8 representation uses four bytes for supplementary characters.
readVInt | ( | ) |
Returns a variable-length integer from the current position in the file and advances the file pointer.
|
abstract |
Sets the file position indicator and advances the file pointer.
The new position, measured in bytes from the beginning of the file, is obtained by adding offset to the position specified by whence, whose values are defined as follows: SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset. (To move to a position before the end-of-file, you need to pass a negative value in offset.) Upon success, returns 0; otherwise, returns -1
integer | $offset | |
integer | $whence |
|
abstract |
Get file position.
|
abstract |
Unlock file.
writeByte | ( | $byte | ) |
Writes a byte to the end of the file.
integer | $byte |
writeBytes | ( | $data, | |
$num = null |
|||
) |
Writes num bytes of data (all, if $num===null) to the end of the string.
string | $data | |
integer | $num |
writeInt | ( | $value | ) |
Writes an integer to the end of file.
integer | $value |
writeLong | ( | $value | ) |
Writes long integer to the end of file.
integer | $value |
Zend_Search_Lucene_Exception |
Check, that we work in 64-bit mode. fseek() and ftell() use long for offset. Thus, largest index segment file size in 32bit mode is 2Gb
writeLong32Bit | ( | $value | ) |
Writes long integer to the end of file (32-bit platforms implementation)
integer | float | $value |
Zend_Search_Lucene_Exception |
writeString | ( | $str | ) |
Writes a string to the end of file.
string | $str |
Zend_Search_Lucene_Exception |
This implementation supports only Basic Multilingual Plane (BMP) characters (from 0x0000 to 0xFFFF) and doesn't support "supplementary characters" (characters whose code points are greater than 0xFFFF) Java 2 represents these characters as a pair of char (16-bit) values, the first from the high-surrogates range (0xD800-0xDBFF), the second from the low-surrogates range (0xDC00-0xDFFF). Then they are encoded as usual UTF-8 characters in six bytes. Standard UTF-8 representation uses four bytes for supplementary characters.
String is already in Java 2 representation. We should only calculate actual string length and replace by
writeVInt | ( | $value | ) |
Writes a variable-length integer to the end of file.
integer | $value |