Class BEBinaryWriter
Extends the BinaryWriter class to allow writing values in the BigEndian format.
Implements
Inherited Members
Namespace: NetTopologySuite.IO
Assembly: NetTopologySuite.dll
Syntax
public class BEBinaryWriter : BinaryWriter, IDisposable
Remarks
While BEBinaryWriter extends BinaryWriter adding methods for writing integer values (Write(Int32)) and double values (Write(Double)) in the BigEndian format, this implementation overrides methods, such Write(Int32) and Write(Double) and more, for writing BigEndian values in the BigEndian format.
Constructors
| Improve this Doc View SourceBEBinaryWriter()
Initializes a new instance of the BEBinaryWriter class.
Declaration
public BEBinaryWriter()
BEBinaryWriter(Stream)
Initializes a new instance of the BEBinaryWriter class.
Declaration
public BEBinaryWriter(Stream output)
Parameters
Type | Name | Description |
---|---|---|
Stream | output | The supplied stream. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | output is null. |
ArgumentException | The stream does not support writing, or the stream is already closed. |
BEBinaryWriter(Stream, Encoding)
Initializes a new instance of the BEBinaryWriter class.
Declaration
public BEBinaryWriter(Stream output, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
Stream | output | The supplied stream. |
Encoding | encoding | The character encoding. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | output or encoding is null. |
ArgumentException | The stream does not support writing, or the stream is already closed. |
Methods
| Improve this Doc View SourceWrite(Double)
Writes an eight-byte floating-point value to the current stream using BigEndian encoding and advances the stream position by eight bytes.
Declaration
public override void Write(double value)
Parameters
Type | Name | Description |
---|---|---|
Double | value | The eight-byte floating-point value to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(Int16)
Writes a two-byte signed integer to the current stream using BigEndian encoding and advances the stream position by two bytes.
Declaration
public override void Write(short value)
Parameters
Type | Name | Description |
---|---|---|
Int16 | value | The two-byte signed integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(Int32)
Writes a four-byte signed integer to the current stream using BigEndian encoding and advances the stream position by four bytes.
Declaration
public override void Write(int value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | value | The four-byte signed integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(Int64)
Writes an eight-byte signed integer to the current stream using BigEndian encoding and advances the stream position by eight bytes.
Declaration
public override void Write(long value)
Parameters
Type | Name | Description |
---|---|---|
Int64 | value | The eight-byte signed integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(Single)
Writes a four-byte floating-point value to the current stream using BigEndian encoding and advances the stream position by four bytes.
Declaration
public override void Write(float value)
Parameters
Type | Name | Description |
---|---|---|
Single | value | The four-byte floating-point value to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(UInt16)
Writes a two-byte unsigned integer to the current stream using BigEndian encoding and advances the stream position by two bytes.
Declaration
[CLSCompliant(false)]
public override void Write(ushort value)
Parameters
Type | Name | Description |
---|---|---|
UInt16 | value | The two-byte unsigned integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(UInt32)
Writes a four-byte unsigned integer to the current stream using BigEndian encoding and advances the stream position by four bytes.
Declaration
[CLSCompliant(false)]
public override void Write(uint value)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | value | The four-byte unsigned integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |
Write(UInt64)
Writes an eight-byte unsigned integer to the current stream using BigEndian encoding and advances the stream position by eight bytes.
Declaration
[CLSCompliant(false)]
public override void Write(ulong value)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | value | The eight-byte unsigned integer to write. |
Overrides
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | The stream is closed. |
IOException | An I/O error occurs. |