Package org.vast.cdm.common
Interface DataOutputExt
- All Superinterfaces:
DataOutput
- All Known Implementing Classes:
DataOutputStreamBI
,DataOutputStreamLI
Extension of DataOutputStream to support writing unsigned byte, short, int and long values as well as ASCII (0 terminated) strings.
- Since:
- Jan 10, 2009
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Flushes and closes the underlying streamvoid
flush()
Flushes this data output stream.void
writeASCII
(String val) Writes a 0 terminated ASCII string to streamvoid
writeUnsignedByte
(short val) Writes the lowest significant byte of the given short value as an unsigned bytevoid
writeUnsignedInt
(long val) Writes the 4 lowest significant bytes of the given long value as an unsigned intvoid
writeUnsignedLong
(long val) Writes long value as unsigned.void
writeUnsignedShort
(int val) Writes the 2 lowest significant bytes of the given int value as an unsigned shortMethods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Method Details
-
writeUnsignedByte
Writes the lowest significant byte of the given short value as an unsigned byte- Parameters:
val
-- Throws:
IOException
-
writeUnsignedShort
Writes the 2 lowest significant bytes of the given int value as an unsigned short- Parameters:
val
-- Throws:
IOException
-
writeUnsignedInt
Writes the 4 lowest significant bytes of the given long value as an unsigned int- Parameters:
val
-- Throws:
IOException
-
writeUnsignedLong
Writes long value as unsigned.- Parameters:
val
-- Throws:
IOException
-
writeASCII
Writes a 0 terminated ASCII string to stream- Parameters:
val
-- Throws:
IOException
-
flush
Flushes this data output stream. This forces any buffered output bytes to be written out to the stream- Throws:
IOException
-
close
Flushes and closes the underlying stream- Throws:
IOException
-