system/io/FileInputStream.php

Show: inherited
Table of Contents

Input stream subclass for file streams.

Package
phing.system.io  

\FileInputStream

Package: phing\system\io

Input stream subclass for file streams.

Parent(s)
\InputStream

Properties

Propertyprotectedint  $currentPosition= '0'
inherited

Position of stream cursor.Inherited from: \InputStream::$$currentPosition
Default value0Details
Type
int
Inherited_from
\InputStream::$$currentPosition  
Propertyprotected\PhingFile  $file= ''

The associated file.

Details
Type
\PhingFile
Propertyprotectedint  $mark= '0'
inherited

Marked position of stream cursor.Inherited from: \InputStream::$$mark
Default value0Details
Type
int
Inherited_from
\InputStream::$$mark  
Propertyprotectedresource  $stream= ''
inherited

The attached PHP stream.Inherited from: \InputStream::$$stream
Details
Type
resource
Inherited_from
\InputStream::$$stream  

Methods

methodpublic__construct( \PhingFile | string $file, boolean $append = false ) : void

Construct a new FileInputStream.

Parameters
Name Type Description
$file \PhingFile | string

Path to the file

$append boolean

Whether to append (ignored)

Throws
Exception Description
\Exception - if invalid argument specified.
\IOException - if unable to open file.
methodpublic__toString( ) : string

Returns a string representation of the attached file.

Returns
Type Description
string
methodpublicclose( ) : void
inherited

Closes stream.

Inherited from: \InputStream::close()
Throws
Exception Description
\IOException if stream cannot be closed (note that calling close() on an already-closed stream will not raise an exception)
methodpubliceof( ) : boolean
inherited

Whether eof has been reached with stream.

Inherited from: \InputStream::eof()
Returns
Type Description
boolean
methodpublicmark( ) : void
inherited

Marks the current position in this input stream.

Inherited from: \InputStream::mark()
Throws
Exception Description
\IOException - if the underlying stream doesn't support this method.
methodpublicmarkSupported( ) : boolean

Mark is supported by FileInputStream.

Returns
Type Description
boolean TRUE
methodpublicread( int $len = null ) : string
inherited

Read data from stream until $len chars or EOF.

Inherited from: \InputStream::read()
Parameters
Name Type Description
$len int

Num chars to read. If not specified this stream will read until EOF.

Returns
Type Description
string chars read or -1 if eof.
methodpublicreadInto( string $rBuffer ) : TRUE
inherited

Reads a entire until EOF and places contents in passed-in variable. Stream is closed after read.

Inherited from: \InputStream::readInto()
Parameters
Name Type Description
$rBuffer string

&$rBuffer String variable where read contents will be put.

Returns
Type Description
TRUE on success.
Throws
Exception Description
\IOException - if there is an error reading from stream.
Details
Author
Charlie Killian, charlie@tizac.com  
methodpublicreset( ) : void
inherited

Repositions this stream to the position at the time the mark method was last called on this input stream.

Inherited from: \InputStream::reset()
Throws
Exception Description
\IOException - if the underlying stream doesn't support this method.
methodpublicskip( int $n ) : void
inherited

Skip over $n bytes.

Inherited from: \InputStream::skip()
Parameters
Name Type Description
$n int
Documentation was generated by DocBlox 0.18.1.