C# Class Files.FileReader

Inheritance: IDisposable
显示文件 Open project: Afr0Games/Project-Dollhouse

Public Methods

Method Description
Close ( ) : void

Closes this FileReader instance.

Dispose ( ) : void
FileReader ( Stream DataStream, bool BigEndian ) : System

Creates a new FileReader instance.

FileReader ( string Path, bool BigEndian ) : System

Creates a new FileReader instance.

ReadByte ( ) : byte

Reads a byte from the underlying stream.

ReadBytes ( int Count ) : byte[]

Reads a specified number of bytes from the underlying stream.

ReadCString ( ) : string

Reads a null-terminated string from the underlying stream.

ReadFloat ( ) : float

Reads a float from the underlying stream. Doesn't support endian swapping.

ReadInt16 ( ) : short

Reads a short from the underlying stream.

ReadInt32 ( ) : int

Reads an int from the underlying stream.

ReadPaddedCString ( ) : string

Reads a padded null-terminated string from the underlying stream.

ReadPascalString ( ) : string

Reads a pascal string from the underlying stream, where one byte preceeds it denoting the length.

ReadString ( ) : string

Reads a string from the underlying stream.

ReadString ( int NumChars ) : string

Reads a string with a pre-determined length from the underlying stream.

ReadToEnd ( ) : byte[]

Reads all the remaining bytes in this stream.

ReadUInt32 ( ) : uint

Reads a uint from the underlying stream.

ReadUInt64 ( ) : ulong

Reads a ulong from the underlying stream.

ReadUShort ( ) : ushort

Reads a ushort from the underlying stream.

Seek ( long Offset ) : void

Seeks in the underlying stream, always assuming an origin of the beginning of the stream.

Protected Methods

Method Description
Dispose ( bool CleanupNativeAndManagedResources ) : void

Method Details

Close() public method

Closes this FileReader instance.
public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool CleanupNativeAndManagedResources ) : void
CleanupNativeAndManagedResources bool
return void

FileReader() public method

Creates a new FileReader instance.
public FileReader ( Stream DataStream, bool BigEndian ) : System
DataStream Stream
BigEndian bool Is the data stored as big endian?
return System

FileReader() public method

Creates a new FileReader instance.
public FileReader ( string Path, bool BigEndian ) : System
Path string The path of the file to read.
BigEndian bool Is the filed stored as big endian?
return System

ReadByte() public method

Reads a byte from the underlying stream.
public ReadByte ( ) : byte
return byte

ReadBytes() public method

Reads a specified number of bytes from the underlying stream.
public ReadBytes ( int Count ) : byte[]
Count int Number of bytes to read.
return byte[]

ReadCString() public method

Reads a null-terminated string from the underlying stream.
public ReadCString ( ) : string
return string

ReadFloat() public method

Reads a float from the underlying stream. Doesn't support endian swapping.
public ReadFloat ( ) : float
return float

ReadInt16() public method

Reads a short from the underlying stream.
public ReadInt16 ( ) : short
return short

ReadInt32() public method

Reads an int from the underlying stream.
public ReadInt32 ( ) : int
return int

ReadPaddedCString() public method

Reads a padded null-terminated string from the underlying stream.
public ReadPaddedCString ( ) : string
return string

ReadPascalString() public method

Reads a pascal string from the underlying stream, where one byte preceeds it denoting the length.
public ReadPascalString ( ) : string
return string

ReadString() public method

Reads a string from the underlying stream.
public ReadString ( ) : string
return string

ReadString() public method

Reads a string with a pre-determined length from the underlying stream.
public ReadString ( int NumChars ) : string
NumChars int Number of characters in string.
return string

ReadToEnd() public method

Reads all the remaining bytes in this stream.
public ReadToEnd ( ) : byte[]
return byte[]

ReadUInt32() public method

Reads a uint from the underlying stream.
public ReadUInt32 ( ) : uint
return uint

ReadUInt64() public method

Reads a ulong from the underlying stream.
public ReadUInt64 ( ) : ulong
return ulong

ReadUShort() public method

Reads a ushort from the underlying stream.
public ReadUShort ( ) : ushort
return ushort

Seek() public method

Seeks in the underlying stream, always assuming an origin of the beginning of the stream.
public Seek ( long Offset ) : void
Offset long The offset to seek to.
return void