PHP Interface ParagonIE\Halite\Contract\StreamInterface

Datei anzeigen Open project: paragonie/halite Interface Usage Examples

Public Methods

Method Description
getPos ( ) : integer Where are we in the buffer?
getSize ( ) : integer How big is this buffer?
readBytes ( integer $num, boolean $skipTests = false ) : string Read from a stream; prevent partial reads
remainingBytes ( ) : integer How many bytes are left between here and the end of the stream?
writeBytes ( string $buf, integer $num = null ) : integer Write to a stream; prevent partial writes

Method Details

getPos() public method

Where are we in the buffer?
public getPos ( ) : integer
return integer

getSize() public method

How big is this buffer?
public getSize ( ) : integer
return integer

readBytes() public method

Read from a stream; prevent partial reads
public readBytes ( integer $num, boolean $skipTests = false ) : string
$num integer
$skipTests boolean
return string

remainingBytes() public method

How many bytes are left between here and the end of the stream?
public remainingBytes ( ) : integer
return integer

writeBytes() public method

Write to a stream; prevent partial writes
public writeBytes ( string $buf, integer $num = null ) : integer
$buf string
$num integer (number of bytes)
return integer