public override void WriteByte (byte value)
{
if (closed)
throw new ObjectDisposedException("The stream is closed");
if (current_position == capacity)
throw new NotSupportedException("The current position is at the end of the capacity of the stream");
if (fileaccess == FileAccess.Read)
throw new NotSupportedException("Stream does not support writing.");
else {
unsafe {
Marshal.WriteByte(initial_pointer, (int)current_position, value);
current_position++;
if (current_position > length)
length = current_position;
}
}
}