public class ByteWriter extends Object
| Constructor and Description |
|---|
ByteWriter()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the byte writer
|
ByteOrder |
getByteOrder()
Get the byte order
|
byte[] |
getBytes()
Get the written bytes
|
void |
setByteOrder(ByteOrder byteOrder)
Set the byte order
|
int |
size()
Get the current size in bytes written
|
void |
writeByte(byte value)
Write a byte
|
void |
writeDouble(double value)
Write a double
|
void |
writeInt(int value)
Write an integer
|
void |
writeString(String value)
Write a String
|
public void close()
public ByteOrder getByteOrder()
public void setByteOrder(ByteOrder byteOrder)
byteOrder - byte orderpublic byte[] getBytes()
public int size()
public void writeString(String value) throws IOException
value - string valueIOException - upon errorpublic void writeByte(byte value)
value - bytepublic void writeInt(int value)
throws IOException
value - int valueIOException - upon errorpublic void writeDouble(double value)
throws IOException
value - doubleIOException - upon errorCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.