API Documentation

Search/Lucene/Storage/File.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Storage
version
$Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Search_Lucene_Storage_File

Description

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.

Zend_Search_Lucene_Storage_File

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Storage
Methods
_fread
seek
tell
flush
_fwrite
lock
unlock
readByte
writeByte
readBytes
writeBytes
readInt
writeInt
readLong
writeLong
readLong32Bit
writeLong32Bit
readVInt
writeVInt
readString
writeString
readBinary

Description

Methods

_fread

_fread( integer $length = 1 ) : string

Reads $length number of bytes at the current position in the file and advances the file pointer.

Arguments
$length
integer
Output
string
Details
visibility
protected
final
false
static
false

_fwrite

_fwrite( string $data, integer $length = null ) :

Writes $length number of bytes (all, if $length===null) to the end of the file.

Arguments
$data
string
$length
integer
Details
visibility
protected
final
false
static
false

flush

flush( ) : boolean

Flush output.

Returns true on success or false on failure.

Output
boolean
Details
visibility
public
final
false
static
false

lock

lock( integer $lockType,  $nonBlockinLock = false ) : boolean

Lock file

Lock type may be a LOCK_SH (shared lock) or a LOCK_EX (exclusive lock)

Arguments
$lockType
integer
$nonBlockinLock
Output
boolean
Details
visibility
public
final
false
static
false

readBinary

readBinary( ) : string

Reads binary data from the current position in the file and advances the file pointer.

Output
string
Details
visibility
public
final
false
static
false

readByte

readByte( ) : integer

Reads a byte from the current position in the file and advances the file pointer.

Output
integer
Details
visibility
public
final
false
static
false

readBytes

readBytes( integer $num ) : string

Read num bytes from the current position in the file and advances the file pointer.

Arguments
$num
integer
Output
string
Details
visibility
public
final
false
static
false

readInt

readInt( ) : integer

Reads an integer from the current position in the file and advances the file pointer.

Output
integer
Details
visibility
public
final
false
static
false

readLong

readLong( ) : integer|float

Returns a long integer from the current position in the file and advances the file pointer.

Output
integer|float
Details
visibility
public
final
false
static
false
throws

readLong32Bit

readLong32Bit( ) : integer|float

Returns a long integer from the current position in the file, advances the file pointer and return it as float (for 32-bit platforms).

Output
integer|float
Details
visibility
public
final
false
static
false
throws

readString

readString( ) : string

Reads a string from the current position in the file and advances the file pointer.

Output
string
Details
visibility
public
final
false
static
false

readVInt

readVInt( ) : integer

Returns a variable-length integer from the current position in the file and advances the file pointer.

Output
integer
Details
visibility
public
final
false
static
false

seek

seek( integer $offset, integer $whence = SEEK_SET ) : integer

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

Arguments
$offset
integer
$whence
integer
Output
integer
Details
visibility
public
final
false
static
false

tell

tell( ) : integer

Get file position.

Output
integer
Details
visibility
public
final
false
static
false

unlock

unlock( ) :

Unlock file

Details
visibility
public
final
false
static
false

writeByte

writeByte( integer $byte ) :

Writes a byte to the end of the file.

Arguments
$byte
integer
Details
visibility
public
final
false
static
false

writeBytes

writeBytes( string $data, integer $num = null ) :

Writes num bytes of data (all, if $num===null) to the end of the string.

Arguments
$data
string
$num
integer
Details
visibility
public
final
false
static
false

writeInt

writeInt( integer $value ) :

Writes an integer to the end of file.

Arguments
$value
integer
Details
visibility
public
final
false
static
false

writeLong

writeLong( integer $value ) :

Writes long integer to the end of file

Arguments
$value
integer
Details
visibility
public
final
false
static
false
throws

writeLong32Bit

writeLong32Bit( integer|float $value ) :

Writes long integer to the end of file (32-bit platforms implementation)

Arguments
$value
integerfloat
Details
visibility
public
final
false
static
false
throws

writeString

writeString( string $str ) :

Writes a string to the end of file.

Arguments
$str
string
Details
visibility
public
final
false
static
false
throws

writeVInt

writeVInt( integer $value ) :

Writes a variable-length integer to the end of file.

Arguments
$value
integer
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.