# FileInputStream

Extends \InputStream

Input stream subclass for file streams.

package | phing.system.io

### Methods

## Construct a new InputStream.

    __construct(resource $stream)

inherited

throws |

### Arguments

#### $stream

`resource`

Configured PHP stream for writing.

## Returns string representation of attached stream.

    __toString() : string

inherited

### Response

`string`

## 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`

## Marks the current position in this input stream.

    mark()

inherited

throws | if the underlying stream doesn't support this method.

## Whether the input stream supports mark and reset methods.

    markSupported() : boolean

inherited

### Response

`boolean`

## Read data from stream until $len chars or EOF.

    read(integer $len = null) : string

inherited

### Arguments

#### $len

`integer`

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

### Response

`string`

chars read or -1 if eof.

## 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.

## 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.

## Skip over $n bytes.

    skip(integer $n) : integer

inherited

### Arguments

#### $n

`integer`

### Response

`integer`

### 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 : integer

inherited

var | Position of stream cursor.

### Type(s)

`integer`

## Marked position of stream cursor.

    mark : integer

inherited

var | Marked position of stream cursor.

### Type(s)

`integer`