C# Class FSO.Files.Utils.IoWriter

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

Public Properties

Property Type Description
ByteOrder ByteOrder

Public Methods

Method 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 method

public Dispose ( ) : void
return void

FromBytes() public static method

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

FromBytes() public static method

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.
return IoWriter

FromStream() public static method

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

FromStream() public static method

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.
return IoWriter

IoWriter() public method

Creates a new IOBuffer instance from a stream.
public IoWriter ( Stream stream ) : System
stream Stream
return System

Seek() public method

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.
return void

Skip() public method

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.
return void

WriteByte() public method

Writes a byte to the current stream.
public WriteByte ( byte value ) : void
value byte
return void

WriteBytes() public method

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

WriteCString() public method

public WriteCString ( string value ) : void
value string
return void

WriteCString() public method

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.
return void

WriteFloat() public method

Writes a float to the current stream.
public WriteFloat ( float value ) : void
value float
return void

WriteInt16() public method

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

WriteInt32() public method

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

WriteLongPascalString() public method

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

WriteNullTerminatedString() public method

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

WritePascalString() public method

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

WriteUInt16() public method

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

WriteUInt32() public method

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

WriteVarLen() public method

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

WriteVariableLengthPascalString() public method

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

Property Details

ByteOrder public_oe property

public ByteOrder ByteOrder
return ByteOrder