C# Class Gammtek.Conduit.IO.EndianWriter

A BinaryWriter implementation to write individual bits to a stream and support writing data types for platforms with different Endian configurations. Note: for compatibility with streams written with BinaryWriter, character data uses the provided encoding and does not perform any Endian swapping with the data.
Inheritance: System.IO.BinaryWriter
Afficher le fichier Open project: ME3Explorer/ME3Explorer

Méthodes publiques

Méthode Description
EndianWriter ( ) : System

Initializes a new instance of the EndianWriter class.

EndianWriter ( BinaryWriter target ) : System

Creates an EndianWriter using the given target BinaryWriter.

EndianWriter ( Stream stream ) : System

Initializes a new instance of the EndianWriter class with the underlying stream and default encoding (UTF8).

EndianWriter ( Stream stream, Encoding encoding ) : System

Initializes a new instance of the EndianWriter class with the underlying stream and encoding.

Flush ( ) : void

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.

Seek ( int offset, SeekOrigin origin ) : long

Sets the position within the current stream.

Write ( bool value ) : void

Writes a one-byte Boolean value to the current stream, with 0 representing false and 1 representing true.

Write ( byte value ) : void

Writes one byte to the current stream.

Write ( byte buffer, int index, int count ) : void

Writes a region of a byte array to the current stream.

Write ( char ch ) : void

Writes a character to the stream using the provided encoding.

Write ( char chars, int index, int count ) : void

Writes a region of a character array to the current stream.

Write ( double value ) : void

Writes an eight byte double value to the stream in the target Endian format.

Write ( float value ) : void

Writes a four byte float value to the stream in the target Endian format.

Write ( int value ) : void

Writes a four byte signed integer value to the stream in the target Endian format.

Write ( long value ) : void

Writes an eight byte signed integer value to the stream in the target Endian format.

Write ( sbyte value ) : void

Writes a one byte signed byte value to the stream.

Write ( short value ) : void

Writes a two byte signed integer value to the stream in the target Endian format.

Write ( string value ) : void

Writes a string to the stream using the provided encoding and a variable integer length marker.

Write ( uint value ) : void

Writes a four byte unsigned integer value to the stream in the target Endian format.

Write ( ulong value ) : void

Writes an eight byte unsigned integer value to the stream in the target Endian format.

Write ( ushort value ) : void

Writes a two byte unsigned integer value to the stream in the target Endian format.

Method Details

EndianWriter() public méthode

Initializes a new instance of the EndianWriter class.
public EndianWriter ( ) : System
Résultat System

EndianWriter() public méthode

Creates an EndianWriter using the given target BinaryWriter.
public EndianWriter ( BinaryWriter target ) : System
target System.IO.BinaryWriter
Résultat System

EndianWriter() public méthode

Initializes a new instance of the EndianWriter class with the underlying stream and default encoding (UTF8).
public EndianWriter ( Stream stream ) : System
stream Stream
Résultat System

EndianWriter() public méthode

Initializes a new instance of the EndianWriter class with the underlying stream and encoding.
public EndianWriter ( Stream stream, Encoding encoding ) : System
stream Stream
encoding System.Text.Encoding
Résultat System

Flush() public méthode

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
public Flush ( ) : void
Résultat void

Seek() public méthode

Sets the position within the current stream.
public Seek ( int offset, SeekOrigin origin ) : long
offset int
origin SeekOrigin
Résultat long

Write() public méthode

Writes a one-byte Boolean value to the current stream, with 0 representing false and 1 representing true.
public Write ( bool value ) : void
value bool
Résultat void

Write() public méthode

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

Write() public méthode

Writes a region of a byte array to the current stream.
public Write ( byte buffer, int index, int count ) : void
buffer byte
index int
count int
Résultat void

Write() public méthode

Writes a character to the stream using the provided encoding.
public Write ( char ch ) : void
ch char
Résultat void

Write() public méthode

Writes a region of a character array to the current stream.
public Write ( char chars, int index, int count ) : void
chars char
index int
count int
Résultat void

Write() public méthode

Writes an eight byte double value to the stream in the target Endian format.
public Write ( double value ) : void
value double
Résultat void

Write() public méthode

Writes a four byte float value to the stream in the target Endian format.
public Write ( float value ) : void
value float
Résultat void

Write() public méthode

Writes a four byte signed integer value to the stream in the target Endian format.
public Write ( int value ) : void
value int
Résultat void

Write() public méthode

Writes an eight byte signed integer value to the stream in the target Endian format.
public Write ( long value ) : void
value long
Résultat void

Write() public méthode

Writes a one byte signed byte value to the stream.
public Write ( sbyte value ) : void
value sbyte
Résultat void

Write() public méthode

Writes a two byte signed integer value to the stream in the target Endian format.
public Write ( short value ) : void
value short
Résultat void

Write() public méthode

Writes a string to the stream using the provided encoding and a variable integer length marker.
public Write ( string value ) : void
value string
Résultat void

Write() public méthode

Writes a four byte unsigned integer value to the stream in the target Endian format.
public Write ( uint value ) : void
value uint
Résultat void

Write() public méthode

Writes an eight byte unsigned integer value to the stream in the target Endian format.
public Write ( ulong value ) : void
value ulong
Résultat void

Write() public méthode

Writes a two byte unsigned integer value to the stream in the target Endian format.
public Write ( ushort value ) : void
value ushort
Résultat void