FileInputStream

Extends \InputStream

Input stream subclass for file streams.

package

phing.system.io

Methods

Construct a new InputStream.

__construct(resource $stream) 
inherited

Arguments

$stream

resource

Configured PHP stream for writing.

Returns string representation of attached stream.

__toString() : string
inherited

Response

string

Whether the input stream supports mark and reset methods.

markSupported() : boolean
inherited

Response

boolean

Skip over $n bytes.

skip(int $n) 
inherited

Arguments

$n

int

Read data from stream until $len chars or EOF.

read(int $len = null) : string
inherited

Arguments

$len

int

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

Response

string

chars read or -1 if eof.

Marks the current position in this input stream.

mark() 
inherited
throws
  • if the underlying stream doesn't support this method.

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

reset() 
inherited
throws
  • if the underlying stream doesn't support this method.

Closes stream.

close() 
inherited
throws

if stream cannot be closed (note that calling close() on an already-closed stream will not raise an exception)

Whether eof has been reached with stream.

eof() : boolean
inherited

Response

boolean

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

readInto($rBuffer) : TRUE
inherited
author

Charlie Killian, charlie@tizac.com

throws
  • if there is an error reading from stream.
deprecated
  • Instead, use the read() method or a BufferedReader.

Arguments

$rBuffer

Response

TRUE

on success.

Properties

The associated file.

file : \PhingFile
var

Type(s)

\PhingFile

The attached PHP stream.

stream : resource
inherited
var

The attached PHP stream.

Type(s)

resource

Position of stream cursor.

currentPosition : int
inherited
var

Position of stream cursor.

Type(s)

int

Marked position of stream cursor.

mark : int
inherited
var

Marked position of stream cursor.

Type(s)

int