C# 클래스 Apache.NMS.Util.EndianBinaryWriter

상속: System.IO.BinaryWriter
파일 보기 프로젝트 열기: ThorTech/apache-nms

공개 메소드들

메소드 설명
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