[]
        
(Showing Draft Content)

C1.Util.DX.DataStream.Write

Write Method

Write<T>(T)

Writes a single value to the stream, and advances the current position within this stream by the number of bytes written.

Declaration
public void Write<T>(T value) where T : struct
Parameters
Type Name Description
T value

The value to write to the stream.

Type Parameters
Name Description
T

The type of the value to be written to the stream.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

The stream does not support writing.

Write(float)

Writes the specified value.

Declaration
public void Write(float value)
Parameters
Type Name Description
float value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(int)

Writes the specified value.

Declaration
public void Write(int value)
Parameters
Type Name Description
int value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(short)

Writes the specified value.

Declaration
public void Write(short value)
Parameters
Type Name Description
short value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(bool)

Writes the specified value.

Declaration
public void Write(bool value)
Parameters
Type Name Description
bool value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(Vector2)

Writes the specified value.

Declaration
public void Write(Vector2 value)
Parameters
Type Name Description
Vector2 value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(Vector3)

Writes the specified value.

Declaration
public void Write(Vector3 value)
Parameters
Type Name Description
Vector3 value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(Vector4)

Writes the specified value.

Declaration
public void Write(Vector4 value)
Parameters
Type Name Description
Vector4 value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(ColorF)

Writes the specified value.

Declaration
public void Write(ColorF value)
Parameters
Type Name Description
ColorF value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(Matrix4x4)

Writes the specified value.

Declaration
public void Write(Matrix4x4 value)
Parameters
Type Name Description
Matrix4x4 value

The value.

Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Write(byte[], int, int)

Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer

An array of bytes. This method copies count bytes from buffer to the current stream.

int offset

The zero-based byte offset in buffer at which to begin copying bytes to the current stream.

int count

The number of bytes to be written to the current stream.

Overrides
Remarks

In order to provide faster read/write, this operation doesn't check stream bound. A client must carefully not read/write above the size of this datastream.

Exceptions
Type Condition
NotSupportedException

This stream does not support writing.

Write(IntPtr, int, int)

When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Declaration
public void Write(IntPtr buffer, int offset, int count)
Parameters
Type Name Description
IntPtr buffer

An array of bytes. This method copies count bytes from buffer to the current stream.

int offset

The zero-based byte offset in buffer at which to begin copying bytes to the current stream.

int count

The number of bytes to be written to the current stream.