C# Класс FSO.Files.Utils.IoWriter

IOBuffer is a very basic wrapper over System.BinaryReader that inherits from IDisposable.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ByteOrder ByteOrder

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

Метод Описание
Dispose ( ) : void
FromBytes ( byte bytes ) : IoWriter

Creates a new IOBuffer instance from a byte array.

FromBytes ( byte bytes, ByteOrder order ) : IoWriter

Creates a new IOBuffer instance from a byte array, using a specified byte order.

FromStream ( Stream stream ) : IoWriter

Creates a new IoWriter instance from a stream.

FromStream ( Stream stream, ByteOrder order ) : IoWriter

Creates a new IoWriter instance from a stream, using a specified byte order.

IoWriter ( Stream stream ) : System

Creates a new IOBuffer instance from a stream.

Seek ( SeekOrigin origin, long offset ) : void

Seeks in the current stream.

Skip ( long numBytes ) : void

Skips a number of bytes in the current stream, starting from the current position.

WriteByte ( byte value ) : void

Writes a byte to the current stream.

WriteBytes ( byte bytes ) : void

Writes a number of bytes to the current stream.

WriteCString ( string value ) : void
WriteCString ( string value, int num ) : void

Writes a number of ASCII characters to the current stream.

WriteFloat ( float value ) : void

Writes a float to the current stream.

WriteInt16 ( short value ) : void

Writes a 16bit integer to the current stream.

WriteInt32 ( int value ) : void

Writes a 32bit integer to the current stream.

WriteLongPascalString ( string value ) : void

Writes a pascal string to the current stream, which is prefixed by a 16bit short.

WriteNullTerminatedString ( string value ) : void

Writes a C string to the current stream.

WritePascalString ( string value ) : void

Writes a pascal string to the current stream, prefixed by a byte.

WriteUInt16 ( ushort value ) : void

Writes an unsigned 16bit integer to the current stream.

WriteUInt32 ( uint value ) : void

Writes an unsigned 32bit integer from to current stream.

WriteVarLen ( uint value ) : void

Writes a variable length unsigned integer to the current stream

WriteVariableLengthPascalString ( string value ) : void

Writes a pascal string to the current stream.

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

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

public Dispose ( ) : void
Результат void

FromBytes() публичный статический Метод

Creates a new IOBuffer instance from a byte array.
public static FromBytes ( byte bytes ) : IoWriter
bytes byte The byte array to use.
Результат IoWriter

FromBytes() публичный статический Метод

Creates a new IOBuffer instance from a byte array, using a specified byte order.
public static FromBytes ( byte bytes, ByteOrder order ) : IoWriter
bytes byte The byte array to use.
order ByteOrder Byte order to use.
Результат IoWriter

FromStream() публичный статический Метод

Creates a new IoWriter instance from a stream.
public static FromStream ( Stream stream ) : IoWriter
stream Stream A stream.
Результат IoWriter

FromStream() публичный статический Метод

Creates a new IoWriter instance from a stream, using a specified byte order.
public static FromStream ( Stream stream, ByteOrder order ) : IoWriter
stream Stream A stream.
order ByteOrder Byte order to use.
Результат IoWriter

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

Creates a new IOBuffer instance from a stream.
public IoWriter ( Stream stream ) : System
stream Stream
Результат System

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

Seeks in the current stream.
public Seek ( SeekOrigin origin, long offset ) : void
origin SeekOrigin Where to start from.
offset long The offset to seek to.
Результат void

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

Skips a number of bytes in the current stream, starting from the current position.
public Skip ( long numBytes ) : void
numBytes long Number of bytes to skip.
Результат void

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

Writes a byte to the current stream.
public WriteByte ( byte value ) : void
value byte
Результат void

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

Writes a number of bytes to the current stream.
public WriteBytes ( byte bytes ) : void
bytes byte Bytes to write out.
Результат void

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

public WriteCString ( string value ) : void
value string
Результат void

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

Writes a number of ASCII characters to the current stream.
public WriteCString ( string value, int num ) : void
value string The string to write.
num int The number of bytes to write into.
Результат void

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

Writes a float to the current stream.
public WriteFloat ( float value ) : void
value float
Результат void

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

Writes a 16bit integer to the current stream.
public WriteInt16 ( short value ) : void
value short
Результат void

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

Writes a 32bit integer to the current stream.
public WriteInt32 ( int value ) : void
value int
Результат void

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

Writes a pascal string to the current stream, which is prefixed by a 16bit short.
public WriteLongPascalString ( string value ) : void
value string
Результат void

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

Writes a C string to the current stream.
public WriteNullTerminatedString ( string value ) : void
value string
Результат void

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

Writes a pascal string to the current stream, prefixed by a byte.
public WritePascalString ( string value ) : void
value string
Результат void

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

Writes an unsigned 16bit integer to the current stream.
public WriteUInt16 ( ushort value ) : void
value ushort
Результат void

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

Writes an unsigned 32bit integer from to current stream.
public WriteUInt32 ( uint value ) : void
value uint
Результат void

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

Writes a variable length unsigned integer to the current stream
public WriteVarLen ( uint value ) : void
value uint Value to write.
Результат void

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

Writes a pascal string to the current stream.
public WriteVariableLengthPascalString ( string value ) : void
value string
Результат void

Описание свойств

ByteOrder публичное свойство

public ByteOrder ByteOrder
Результат ByteOrder