|
Math2mat
|

Public Member Functions | |
| BinaryIn () | |
| BinaryIn (InputStream is) | |
| BinaryIn (Socket socket) | |
| BinaryIn (URL url) | |
| BinaryIn (String s) | |
| boolean | exists () |
| boolean | isEmpty () |
| boolean | readBoolean () |
| char | readChar () |
| char | readChar (int r) |
| String | readString () |
| short | readShort () |
| int | readInt () |
| int | readIntOther () |
| int | readInt (int r) |
| long | readLong () |
| double | readDouble () |
| float | readFloat () |
| byte | readByte () |
Binary input. This class provides methods for reading in bits from a binary input stream, either one bit at a time (as a boolean), 8 bits at a time (as a byte or char), 16 bits at a time (as a short), 32 bits at a time (as an int or float), or 64 bits at a time (as a double or long).
The binary input stream can be from standard input, a filename, a URL name, a Socket, or an InputStream.
All primitive types are assumed to be represented using their standard Java representations, in big-endian (most significant byte first) order.
The client should not intermix calls to BinaryIn with calls to In; otherwise unexpected behavior will result.
Definition at line 45 of file BinaryIn.java.
| m2m.backend.verifpga.BinaryIn.BinaryIn | ( | ) |
Create a binary input stream from standard input.
Definition at line 63 of file BinaryIn.java.
| m2m.backend.verifpga.BinaryIn.BinaryIn | ( | InputStream | is | ) |
Create a binary input stream from an InputStream.
Definition at line 71 of file BinaryIn.java.
| m2m.backend.verifpga.BinaryIn.BinaryIn | ( | Socket | socket | ) |
Create a binary input stream from a socket.
Definition at line 79 of file BinaryIn.java.
| m2m.backend.verifpga.BinaryIn.BinaryIn | ( | URL | url | ) |
Create a binary input stream from a URL.
Definition at line 94 of file BinaryIn.java.
| m2m.backend.verifpga.BinaryIn.BinaryIn | ( | String | s | ) |
Create a binary input stream from a filename or URL name.
Definition at line 109 of file BinaryIn.java.
| boolean m2m.backend.verifpga.BinaryIn.exists | ( | ) |
Does the binary input stream exist?
Definition at line 140 of file BinaryIn.java.
| boolean m2m.backend.verifpga.BinaryIn.isEmpty | ( | ) |
Returns true if the binary input stream is empty.
Definition at line 149 of file BinaryIn.java.
| boolean m2m.backend.verifpga.BinaryIn.readBoolean | ( | ) |
Read the next bit of data from the binary input stream and return as a boolean.
boolean | RuntimeException | if the input stream is empty |
Definition at line 158 of file BinaryIn.java.
| byte m2m.backend.verifpga.BinaryIn.readByte | ( | ) |
Read the next 8 bits from the binary input stream and return as an 8-bit byte.
byte | RuntimeException | if there are fewer than 8 bits available |
Definition at line 342 of file BinaryIn.java.
| char m2m.backend.verifpga.BinaryIn.readChar | ( | ) |
Read the next 8 bits from the binary input stream and return as an 8-bit char.
char | RuntimeException | if there are fewer than 8 bits available |
Definition at line 171 of file BinaryIn.java.
| char m2m.backend.verifpga.BinaryIn.readChar | ( | int | r | ) |
Read the next r bits from the binary input stream and return as an r-bit character.
| r | number of bits to read. |
char | RuntimeException | if there are fewer than r bits available |
Definition at line 201 of file BinaryIn.java.
| double m2m.backend.verifpga.BinaryIn.readDouble | ( | ) |
Read the next 64 bits from the binary input stream and return as a 64-bit double.
double | RuntimeException | if there are fewer than 64 bits available |
Definition at line 323 of file BinaryIn.java.
| float m2m.backend.verifpga.BinaryIn.readFloat | ( | ) |
Read the next 32 bits from standard input and return as a 32-bit float.
float | RuntimeException | if there are fewer than 32 bits available on standard input |
Definition at line 332 of file BinaryIn.java.
| int m2m.backend.verifpga.BinaryIn.readInt | ( | ) |
Read the next 32 bits from the binary input stream and return as a 32-bit int.
int | RuntimeException | if there are fewer than 32 bits available |
Definition at line 255 of file BinaryIn.java.
| int m2m.backend.verifpga.BinaryIn.readInt | ( | int | r | ) |
Read the next r bits from the binary input stream return as an r-bit int.
| r | number of bits to read. |
int | RuntimeException | if there are fewer than r bits available on standard input |
Definition at line 288 of file BinaryIn.java.
| int m2m.backend.verifpga.BinaryIn.readIntOther | ( | ) |
Read the next 32 bits from the binary input stream and return as a 32-bit int.
int | RuntimeException | if there are fewer than 32 bits available |
Definition at line 270 of file BinaryIn.java.
| long m2m.backend.verifpga.BinaryIn.readLong | ( | ) |
Read the next 64 bits from the binary input stream and return as a 64-bit long.
long | RuntimeException | if there are fewer than 64 bits available |
Definition at line 308 of file BinaryIn.java.
| short m2m.backend.verifpga.BinaryIn.readShort | ( | ) |
Read the next 16 bits from the binary input stream and return as a 16-bit short.
short | RuntimeException | if there are fewer than 16 bits available |
Definition at line 240 of file BinaryIn.java.
| String m2m.backend.verifpga.BinaryIn.readString | ( | ) |
Read the remaining bytes of data from the binary input stream and return as a string.
String | RuntimeException | if the input stream is empty or if the number of bits available is not a multiple of 8 (byte-aligned) |
Definition at line 223 of file BinaryIn.java.
1.7.3