public class ReadWriteableByte extends Object implements ReadWriteable, Comparable<ReadWriteableByte>
| Modifier and Type | Field and Description |
|---|---|
byte |
value
The underlying value
|
| Constructor and Description |
|---|
ReadWriteableByte()
Construct the wrapper with the value of 0.
|
ReadWriteableByte(byte value)
Construct the wrapper with the given value.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
int |
compareTo(ReadWriteableByte arg0) |
boolean |
equals(Object o) |
int |
hashCode() |
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public byte value
public ReadWriteableByte(byte value)
value - the valuepublic ReadWriteableByte()
public void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic int compareTo(ReadWriteableByte arg0)
compareTo in interface Comparable<ReadWriteableByte>