C# Class BinaryWriterExtensions, UnityRose

显示文件 Open project: osROSE/UnityRose Class Usage Examples

Public Properties

Property Type Description
DefaultEncoding Encoding,

Public Methods

Method Description
Write ( this writer, Matrix4x4, value ) : void

Writes the specified matrix to the underlying stream.

Write ( this writer, Quaternion, value, bool w = false ) : void

Writes the specified vector to the underlying stream.

Write ( this writer, ShortVector3 value ) : void

Writes the specified vector to the underlying stream.

Write ( this writer, ShortVector4 value ) : void

Writes the specified vector to the underlying stream.

Write ( this writer, Vector2 value ) : void

Writes the specified vector to the underlying stream.

Write ( this writer, Vector3 value ) : void

Writes the specified vector to the underlying stream.

Write ( this writer, Vector4 value ) : void

Writes the specified vector to the underlying stream.

WriteByteString ( this writer, string value ) : void

Writes the specified string pre-fixed with the string length as a 8-bit integer to the underlying stream.

WriteByteString ( this writer, string value, Encoding, encoding ) : void

Writes the specified string pre-fixed with the string length as a 8-bit integer to the underlying stream.

WriteIntString ( this writer, string value ) : void

Writes the specified string pre-fixed with the string length as a 32-bit integer to the underlying stream.

WriteIntString ( this writer, string value, Encoding, encoding ) : void

Writes the specified string pre-fixed with the string length as a 32-bit integer to the underlying stream.

WriteShortString ( this writer, string value ) : void

Writes the specified string pre-fixed with the string length as a 16-bit integer to the underlying stream.

WriteShortString ( this writer, string value, Encoding, encoding ) : void

Writes the specified string pre-fixed with the string length as a 16-bit integer to the underlying stream.

WriteString ( this writer, string value ) : void

Writes the specified string to the underlying stream.

WriteString ( this writer, string value, Encoding, encoding ) : void

Writes the specified string to the underlying stream.

WriteString ( this writer, string value, int length, Encoding, encoding, char paddingCharacter = '\0' ) : void

Writes the specified string to the underlying stream.

WriteString ( this writer, string value, int length, char paddingCharacter = '\0' ) : void

Writes the specified string to the underlying stream.

Private Methods

Method Description
BinaryWriterExtensions ( ) : System

Initializes the BinaryReaderExtensions class.

Method Details

Write() public static method

Writes the specified matrix to the underlying stream.
public static Write ( this writer, Matrix4x4, value ) : void
writer this
value Matrix4x4, The matrix value.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, Quaternion, value, bool w = false ) : void
writer this
value Quaternion, The quaternion value.
w bool if set to true the value is written in the order WXYZ, else XYZW.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, ShortVector3 value ) : void
writer this
value ShortVector3 The vector value.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, ShortVector4 value ) : void
writer this
value ShortVector4 The vector value.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, Vector2 value ) : void
writer this
value Vector2 The vector value.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, Vector3 value ) : void
writer this
value Vector3 The vector value.
return void

Write() public static method

Writes the specified vector to the underlying stream.
public static Write ( this writer, Vector4 value ) : void
writer this
value Vector4 The vector value.
return void

WriteByteString() public static method

Writes the specified string pre-fixed with the string length as a 8-bit integer to the underlying stream.
public static WriteByteString ( this writer, string value ) : void
writer this
value string The string value.
return void

WriteByteString() public static method

Writes the specified string pre-fixed with the string length as a 8-bit integer to the underlying stream.
public static WriteByteString ( this writer, string value, Encoding, encoding ) : void
writer this
value string The string value.
encoding Encoding, The character encoding.
return void

WriteIntString() public static method

Writes the specified string pre-fixed with the string length as a 32-bit integer to the underlying stream.
public static WriteIntString ( this writer, string value ) : void
writer this
value string The string value.
return void

WriteIntString() public static method

Writes the specified string pre-fixed with the string length as a 32-bit integer to the underlying stream.
public static WriteIntString ( this writer, string value, Encoding, encoding ) : void
writer this
value string The string value.
encoding Encoding, The character encoding.
return void

WriteShortString() public static method

Writes the specified string pre-fixed with the string length as a 16-bit integer to the underlying stream.
public static WriteShortString ( this writer, string value ) : void
writer this
value string The string value.
return void

WriteShortString() public static method

Writes the specified string pre-fixed with the string length as a 16-bit integer to the underlying stream.
public static WriteShortString ( this writer, string value, Encoding, encoding ) : void
writer this
value string The string value.
encoding Encoding, The character encoding.
return void

WriteString() public static method

Writes the specified string to the underlying stream.
public static WriteString ( this writer, string value ) : void
writer this
value string The string value.
return void

WriteString() public static method

Writes the specified string to the underlying stream.
public static WriteString ( this writer, string value, Encoding, encoding ) : void
writer this
value string The string value.
encoding Encoding, The character encoding.
return void

WriteString() public static method

Writes the specified string to the underlying stream.
public static WriteString ( this writer, string value, int length, Encoding, encoding, char paddingCharacter = '\0' ) : void
writer this
value string The string value.
length int The fixed length.
encoding Encoding, The character encoding.
paddingCharacter char
return void

WriteString() public static method

Writes the specified string to the underlying stream.
public static WriteString ( this writer, string value, int length, char paddingCharacter = '\0' ) : void
writer this
value string The string value.
length int The fixed length.
paddingCharacter char
return void

Property Details

DefaultEncoding public_oe static_oe property

The default encoding to be used when reading strings.
public static Encoding, DefaultEncoding
return Encoding,