C# Класс Fanx.Util.DataReader

DataReader is an implemention of java.io.DataInputStream for .NET.
Наследование: System.IO.BinaryReader
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
utfErr ( ) : Exception

Описание методов

DataReader() публичный Метод

Construct a new DataReader for the given stream.
public DataReader ( Stream baseStream ) : System
baseStream Stream
Результат System

ReadBoolean() публичный Метод

Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
public ReadBoolean ( ) : bool
Результат bool

ReadChar() публичный Метод

Reads and returns one input byte. Reads an input char and returns the char value
public ReadChar ( ) : char
Результат char

ReadDouble() публичный Метод

Reads eight input bytes and returns a double value.
public ReadDouble ( ) : double
Результат double

ReadFloat() публичный Метод

Reads four input bytes and returns a float value.
public ReadFloat ( ) : float
Результат float

ReadFully() публичный Метод

Reads some bytes from an input stream and stores them into the buffer array b.
public ReadFully ( byte b ) : void
b byte
Результат void

ReadFully() публичный Метод

Reads len bytes from an input stream.
public ReadFully ( byte b, int off, int len ) : void
b byte
off int
len int
Результат void

ReadInt() публичный Метод

Reads four input bytes and returns an int value.
public ReadInt ( ) : int
Результат int

ReadLong() публичный Метод

Reads eight input bytes and returns a long value.
public ReadLong ( ) : long
Результат long

ReadShort() публичный Метод

Reads two input bytes and returns a short value.
public ReadShort ( ) : short
Результат short

ReadUTF() публичный Метод

Reads in a string that has been encoded using a modified UTF-8 format.
public ReadUTF ( ) : string
Результат string

ReadUnsignedByte() публичный Метод

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
Результат int

ReadUnsignedShort() публичный Метод

Reads two input bytes and returns an int value in the range 0 through 65535.
public ReadUnsignedShort ( ) : int
Результат int

SkipBytes() публичный Метод

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
Результат int