C# Class Fanx.Util.DataReader

DataReader is an implemention of java.io.DataInputStream for .NET.
Inheritance: System.IO.BinaryReader
Afficher le fichier Open project: xored/f4 Class Usage Examples

Méthodes publiques

Méthode Description
DataReader ( Stream baseStream ) : System

Construct a new DataReader for the given stream.

ReadBoolean ( ) : bool

Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.

ReadChar ( ) : char

Reads and returns one input byte.

Reads an input char and returns the char value

ReadDouble ( ) : double

Reads eight input bytes and returns a double value.

ReadFloat ( ) : float

Reads four input bytes and returns a float value.

ReadFully ( byte b ) : void

Reads some bytes from an input stream and stores them into the buffer array b.

ReadFully ( byte b, int off, int len ) : void

Reads len bytes from an input stream.

ReadInt ( ) : int

Reads four input bytes and returns an int value.

ReadLong ( ) : long

Reads eight input bytes and returns a long value.

ReadShort ( ) : short

Reads two input bytes and returns a short value.

ReadUTF ( ) : string

Reads in a string that has been encoded using a modified UTF-8 format.

ReadUnsignedByte ( ) : int

Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.

ReadUnsignedShort ( ) : int

Reads two input bytes and returns an int value in the range 0 through 65535.

SkipBytes ( int n ) : int

Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.

Private Methods

Méthode Description
utfErr ( ) : Exception

Method Details

DataReader() public méthode

Construct a new DataReader for the given stream.
public DataReader ( Stream baseStream ) : System
baseStream Stream
Résultat System

ReadBoolean() public méthode

Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
public ReadBoolean ( ) : bool
Résultat bool

ReadChar() public méthode

Reads and returns one input byte. Reads an input char and returns the char value
public ReadChar ( ) : char
Résultat char

ReadDouble() public méthode

Reads eight input bytes and returns a double value.
public ReadDouble ( ) : double
Résultat double

ReadFloat() public méthode

Reads four input bytes and returns a float value.
public ReadFloat ( ) : float
Résultat float

ReadFully() public méthode

Reads some bytes from an input stream and stores them into the buffer array b.
public ReadFully ( byte b ) : void
b byte
Résultat void

ReadFully() public méthode

Reads len bytes from an input stream.
public ReadFully ( byte b, int off, int len ) : void
b byte
off int
len int
Résultat void

ReadInt() public méthode

Reads four input bytes and returns an int value.
public ReadInt ( ) : int
Résultat int

ReadLong() public méthode

Reads eight input bytes and returns a long value.
public ReadLong ( ) : long
Résultat long

ReadShort() public méthode

Reads two input bytes and returns a short value.
public ReadShort ( ) : short
Résultat short

ReadUTF() public méthode

Reads in a string that has been encoded using a modified UTF-8 format.
public ReadUTF ( ) : string
Résultat string

ReadUnsignedByte() public méthode

Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
public ReadUnsignedByte ( ) : int
Résultat int

ReadUnsignedShort() public méthode

Reads two input bytes and returns an int value in the range 0 through 65535.
public ReadUnsignedShort ( ) : int
Résultat int

SkipBytes() public méthode

Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes.
public SkipBytes ( int n ) : int
n int
Résultat int