Search/Lucene/Storage/File.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Search_Lucene
- Subpackage
- Storage
- Version
- $Id$
\Zend_Search_Lucene_Storage_File
Package: Zend_Search_Lucene\Storage- Children
- \Zend_Search_Lucene_Storage_File_Filesystem
- \Zend_Search_Lucene_Storage_File_Memory
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods



_fread(integer $length = 1) : stringabstractReads $length number of bytes at the current position in the
file and advances the file pointer.
Parameters| Name | Type | Description |
|---|
| $length | integer | |
|---|
Returns 


_fwrite(string $data, integer $length = null) : voidabstractWrites $length number of bytes (all, if $length===null) to the end
of the file.
Parameters| Name | Type | Description |
|---|
| $data | string | |
|---|
| $length | integer | |
|---|



readBytes(integer $num) : stringRead num bytes from the current position in the file
and advances the file pointer.
Parameters| Name | Type | Description |
|---|
| $num | integer | |
|---|
Returns 


readLong() : integer | floatReturns a long integer from the current position in the file
and advances the file pointer.
Returns| Type | Description |
|---|
| integer | float | |
Throws 


readLong32Bit() : integer | floatReturns a long integer from the current position in the file,
advances the file pointer and return it as float (for 32-bit platforms).
Returns| Type | Description |
|---|
| integer | float | |
Throws 


seek(integer $offset, integer $whence = SEEK_SET) : integerabstractSets 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
Parameters| Name | Type | Description |
|---|
| $offset | integer | |
|---|
| $whence | integer | |
|---|
Returns


writeByte(integer $byte) : voidWrites a byte to the end of the file.
Parameters| Name | Type | Description |
|---|
| $byte | integer | |
|---|



writeBytes(string $data, integer $num = null) : voidWrites num bytes of data (all, if $num===null) to the end
of the string.
Parameters| Name | Type | Description |
|---|
| $data | string | |
|---|
| $num | integer | |
|---|



writeInt(integer $value) : voidWrites an integer to the end of file.
Parameters| Name | Type | Description |
|---|
| $value | integer | |
|---|



writeLong(integer $value) : voidWrites long integer to the end of file
Parameters| Name | Type | Description |
|---|
| $value | integer | |
|---|
Throws 


writeLong32Bit(integer | float $value) : voidWrites long integer to the end of file (32-bit platforms implementation)
Parameters| Name | Type | Description |
|---|
| $value | integer | float | |
|---|
Throws 


writeString(string $str) : voidWrites a string to the end of file.
Parameters| Name | Type | Description |
|---|
| $str | string | |
|---|
Throws 


writeVInt(integer $value) : voidWrites a variable-length integer to the end of file.
Parameters| Name | Type | Description |
|---|
| $value | integer | |
|---|