BinaryOutput Class |
Binary standard output. This class provides methods for converting primtive type variables (boolean, byte, char, int, long, float, and double) to sequences of bits and writing them to standard output. Uses .NET representations, in little-endian (least-significant byte first).
The client must Flush() the output stream when finished writing bits and should not intermixing calls to output with calls to Console or Console.Out; otherwise unexpected behavior will result.
Namespace: Algs4Net
public sealed class BinaryOutput
The BinaryOutput type exposes the following members.
Name | Description | |
---|---|---|
![]() | BinaryOutput |
Represents an output stream from a source, which may not be the standard output
|
Name | Description | |
---|---|---|
![]() | Close |
Flush and close standard output. Once standard output is closed, you can no
longer write bits to it. |
![]() | Flush |
Flush standard output, padding 0s if number of bits written so far
is not a multiple of 8. |
![]() ![]() | MainTest | Test client. |
![]() | Write(Boolean) |
Write the specified bit to standard output. |
![]() | Write(Byte) |
Write the 8-bit byte to standard output. |
![]() | Write(Char) |
Write the 8-bit char to standard output. |
![]() | Write(Double) |
Write the 64-bit double to standard output. |
![]() | Write(Int16) |
Write the 16-bit int to standard output. |
![]() | Write(Int32) |
Write the 32-bit int to standard output. |
![]() | Write(Int64) |
Write the 64-bit long to standard output. |
![]() | Write(Single) |
Write the 32-bit float to standard output. |
![]() | Write(String) |
Write the string of 8-bit characters to standard output. |
![]() | Write(Char, Int32) |
Write the r-bit char to standard output. |
![]() | Write(Int32, Int32) |
Write the r-bit int to standard output. |
![]() | Write(String, Int32) |
Write the string of r-bit characters to standard output. |