C# Класс 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.
Наследование: System.IO.BinaryWriter
Показать файл Открыть проект

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

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

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

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

Initializes a new instance of the EndianWriter class.
public EndianWriter ( ) : System
Результат System

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

Creates an EndianWriter using the given target BinaryWriter.
public EndianWriter ( BinaryWriter target ) : System
target System.IO.BinaryWriter
Результат System

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

Initializes a new instance of the EndianWriter class with the underlying stream and default encoding (UTF8).
public EndianWriter ( Stream stream ) : System
stream Stream
Результат System

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

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

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

Clears all buffers for the current writer and causes any buffered data to be written to the underlying device.
public Flush ( ) : void
Результат void

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

Sets the position within the current stream.
public Seek ( int offset, SeekOrigin origin ) : long
offset int
origin SeekOrigin
Результат long

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

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

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

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

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

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

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

Writes a character to the stream using the provided encoding.
public Write ( char ch ) : void
ch char
Результат void

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

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

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

Writes an eight byte double value to the stream in the target Endian format.
public Write ( double value ) : void
value double
Результат void

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

Writes a four byte float value to the stream in the target Endian format.
public Write ( float value ) : void
value float
Результат void

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

Writes a four byte signed integer value to the stream in the target Endian format.
public Write ( int value ) : void
value int
Результат void

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

Writes an eight byte signed integer value to the stream in the target Endian format.
public Write ( long value ) : void
value long
Результат void

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

Writes a one byte signed byte value to the stream.
public Write ( sbyte value ) : void
value sbyte
Результат void

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

Writes a two byte signed integer value to the stream in the target Endian format.
public Write ( short value ) : void
value short
Результат void

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

Writes a string to the stream using the provided encoding and a variable integer length marker.
public Write ( string value ) : void
value string
Результат void

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

Writes a four byte unsigned integer value to the stream in the target Endian format.
public Write ( uint value ) : void
value uint
Результат void

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

Writes an eight byte unsigned integer value to the stream in the target Endian format.
public Write ( ulong value ) : void
value ulong
Результат void

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

Writes a two byte unsigned integer value to the stream in the target Endian format.
public Write ( ushort value ) : void
value ushort
Результат void