C# Class FSO.Files.Utils.IoWriter

IOBuffer is a very basic wrapper over System.BinaryReader that inherits from IDisposable.
Inheritance: IDisposable
Afficher le fichier Open project: RHY3756547/FreeSO Class Usage Examples

Méthodes publiques

Свойство Type Description
ByteOrder ByteOrder

Méthodes publiques

Méthode Description
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.

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FromBytes() public static méthode

Creates a new IOBuffer instance from a byte array.
public static FromBytes ( byte bytes ) : IoWriter
bytes byte The byte array to use.
Résultat IoWriter

FromBytes() public static méthode

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.
Résultat IoWriter

FromStream() public static méthode

Creates a new IoWriter instance from a stream.
public static FromStream ( Stream stream ) : IoWriter
stream Stream A stream.
Résultat IoWriter

FromStream() public static méthode

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.
Résultat IoWriter

IoWriter() public méthode

Creates a new IOBuffer instance from a stream.
public IoWriter ( Stream stream ) : System
stream Stream
Résultat System

Seek() public méthode

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.
Résultat void

Skip() public méthode

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.
Résultat void

WriteByte() public méthode

Writes a byte to the current stream.
public WriteByte ( byte value ) : void
value byte
Résultat void

WriteBytes() public méthode

Writes a number of bytes to the current stream.
public WriteBytes ( byte bytes ) : void
bytes byte Bytes to write out.
Résultat void

WriteCString() public méthode

public WriteCString ( string value ) : void
value string
Résultat void

WriteCString() public méthode

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.
Résultat void

WriteFloat() public méthode

Writes a float to the current stream.
public WriteFloat ( float value ) : void
value float
Résultat void

WriteInt16() public méthode

Writes a 16bit integer to the current stream.
public WriteInt16 ( short value ) : void
value short
Résultat void

WriteInt32() public méthode

Writes a 32bit integer to the current stream.
public WriteInt32 ( int value ) : void
value int
Résultat void

WriteLongPascalString() public méthode

Writes a pascal string to the current stream, which is prefixed by a 16bit short.
public WriteLongPascalString ( string value ) : void
value string
Résultat void

WriteNullTerminatedString() public méthode

Writes a C string to the current stream.
public WriteNullTerminatedString ( string value ) : void
value string
Résultat void

WritePascalString() public méthode

Writes a pascal string to the current stream, prefixed by a byte.
public WritePascalString ( string value ) : void
value string
Résultat void

WriteUInt16() public méthode

Writes an unsigned 16bit integer to the current stream.
public WriteUInt16 ( ushort value ) : void
value ushort
Résultat void

WriteUInt32() public méthode

Writes an unsigned 32bit integer from to current stream.
public WriteUInt32 ( uint value ) : void
value uint
Résultat void

WriteVarLen() public méthode

Writes a variable length unsigned integer to the current stream
public WriteVarLen ( uint value ) : void
value uint Value to write.
Résultat void

WriteVariableLengthPascalString() public méthode

Writes a pascal string to the current stream.
public WriteVariableLengthPascalString ( string value ) : void
value string
Résultat void

Property Details

ByteOrder public_oe property

public ByteOrder ByteOrder
Résultat ByteOrder