Creates a new data writer for writing data to the given sink.
The sink to write data to.
Returns the default endianness of the writer.
the default endianness used when no endianness is specified as parameter to the various write methods.
Returns the number of written bytes. This value reflects the number of bytes the writer was told to write so far, not the actual number of written bytes (which may not be finished because writing happens asynchronously). When a write operation fails then this counter is invalid and may not be in sync with the output sink any longer.
the number of written bytes.
Writes an signed 64 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of signed 64 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an unsigned 64 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of unsigned 64 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes a signed 16 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of signed 16 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes a signed 32 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of signed 32 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an unsigned 16 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of unsigned 16 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an unsigned 32 bit value.
The value to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes an array of unsigned 32 bit values.
The values to write.
Optional endianness. Defaults to endianness the writer was configured with.
Writes all kind of data values to a specified sink.
Written data is buffered so you have to call the flush method when you are done writing all data to ensure that all data is written to the sink.
All methods of the writer are asynchronous but can safely be used synchronously when you have no reason to wait for it. Usually you only want to wait for the flush method at the end of a write operation.