C# Класс Apache.NMS.Util.EndianBinaryWriter

Наследование: System.IO.BinaryWriter
Показать файл Открыть проект

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

Метод Описание
EndianBinaryWriter ( Stream output ) : System
Write ( String text ) : void

Method Write, writes a string to the output using the WriteString16 method.

Write ( char chars ) : void

Method Write

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

Method Write

Write ( double value ) : void

Method Write

Write ( float value ) : void

Method Write

Write ( int value ) : void

Method Write

Write ( long value ) : void

Method Write

Write ( short value ) : void

Method Write

Write ( uint value ) : void

Method Write

Write ( ulong value ) : void

Method Write

Write ( ushort value ) : void

Method Write

WriteString16 ( String text ) : void

Method WriteString16, writes a string to the output using the Java standard modified UTF-8 encoding with an unsigned short value written first to indicate the length of the encoded data, the short is read as an unsigned value so the max amount of data this method can write is 65535 encoded bytes. Unlike the WriteString32 method this method does not encode the length value to -1 if the string is null, this is to match the behaviour of the Java DataOuputStream class's writeUTF method. Because modified UTF-8 encding can result in a number of bytes greater that the size of the String this method must first check that the encoding proces will not result in a value that cannot be written becuase it is greater than the max value of an unsigned short.

WriteString32 ( String text ) : void

Method WriteString32, writes a string to the output using the Openwire standard modified UTF-8 encoding which an int value written first to indicate the length of the encoded data, the int is read as an signed value so the max amount of data this method can write is 2^31 encoded bytes. In the case of a null value being passed this method writes a -1 to the stream to indicate that the string is null. Because modified UTF-8 encding can result in a number of bytes greater that the size of the String this method must first check that the encoding proces will not result in a value that cannot be written becuase it is greater than the max value of an int.

Приватные методы

Метод Описание
CountUtf8Bytes ( char chars ) : uint
encodeUTF8toBuffer ( char chars, byte buffer ) : void

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

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

public EndianBinaryWriter ( Stream output ) : System
output Stream
Результат System

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

Method Write, writes a string to the output using the WriteString16 method.
public Write ( String text ) : void
text String A string
Результат void

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

Method Write
public Write ( char chars ) : void
chars char A char[]
Результат void

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

Method Write
public Write ( char chars, int index, int count ) : void
chars char A char[]
index int An int
count int An int
Результат void

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

Method Write
public Write ( double value ) : void
value double A double
Результат void

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

Method Write
public Write ( float value ) : void
value float A double
Результат void

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

Method Write
public Write ( int value ) : void
value int An int
Результат void

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

Method Write
public Write ( long value ) : void
value long A long
Результат void

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

Method Write
public Write ( short value ) : void
value short A short
Результат void

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

Method Write
public Write ( uint value ) : void
value uint An uint
Результат void

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

Method Write
public Write ( ulong value ) : void
value ulong An ulong
Результат void

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

Method Write
public Write ( ushort value ) : void
value ushort An ushort
Результат void

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

Method WriteString16, writes a string to the output using the Java standard modified UTF-8 encoding with an unsigned short value written first to indicate the length of the encoded data, the short is read as an unsigned value so the max amount of data this method can write is 65535 encoded bytes. Unlike the WriteString32 method this method does not encode the length value to -1 if the string is null, this is to match the behaviour of the Java DataOuputStream class's writeUTF method. Because modified UTF-8 encding can result in a number of bytes greater that the size of the String this method must first check that the encoding proces will not result in a value that cannot be written becuase it is greater than the max value of an unsigned short.
public WriteString16 ( String text ) : void
text String A string
Результат void

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

Method WriteString32, writes a string to the output using the Openwire standard modified UTF-8 encoding which an int value written first to indicate the length of the encoded data, the int is read as an signed value so the max amount of data this method can write is 2^31 encoded bytes. In the case of a null value being passed this method writes a -1 to the stream to indicate that the string is null. Because modified UTF-8 encding can result in a number of bytes greater that the size of the String this method must first check that the encoding proces will not result in a value that cannot be written becuase it is greater than the max value of an int.
public WriteString32 ( String text ) : void
text String A string
Результат void