Package org.vast.swe
Class DataOutputStreamBI
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.vast.swe.DataOutputStreamBI
- All Implemented Interfaces:
Closeable
,DataOutput
,Flushable
,AutoCloseable
,DataOutputExt
Extension of DataOutputStream to support writing unsigned int and long values as well as ASCII (0 terminated) strings as byte sequence. This is for big endian order (i.e. Most Significant Byte first)
- Since:
- Feb 10, 2006
-
Field Summary
Fields inherited from class java.io.DataOutputStream
written
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
writeASCII
(String s) Writes a 0 terminated ASCII string to streamvoid
writeUnsignedByte
(short v) Writes the lowest significant byte of the given short value as an unsigned bytevoid
writeUnsignedInt
(long v) Writes the 4 lowest significant bytes of the given long value as an unsigned intvoid
writeUnsignedLong
(long v) Writes long value as unsigned.void
writeUnsignedShort
(int v) Writes the 2 lowest significant bytes of the given int value as an unsigned shortMethods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
Methods inherited from class java.io.FilterOutputStream
close, write
Methods inherited from class java.io.OutputStream
nullOutputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
Methods inherited from interface org.vast.cdm.common.DataOutputExt
close, flush
-
Constructor Details
-
DataOutputStreamBI
-
-
Method Details
-
writeUnsignedByte
Description copied from interface:DataOutputExt
Writes the lowest significant byte of the given short value as an unsigned byte- Specified by:
writeUnsignedByte
in interfaceDataOutputExt
- Throws:
IOException
-
writeUnsignedShort
Description copied from interface:DataOutputExt
Writes the 2 lowest significant bytes of the given int value as an unsigned short- Specified by:
writeUnsignedShort
in interfaceDataOutputExt
- Throws:
IOException
-
writeUnsignedInt
Description copied from interface:DataOutputExt
Writes the 4 lowest significant bytes of the given long value as an unsigned int- Specified by:
writeUnsignedInt
in interfaceDataOutputExt
- Throws:
IOException
-
writeUnsignedLong
Description copied from interface:DataOutputExt
Writes long value as unsigned.- Specified by:
writeUnsignedLong
in interfaceDataOutputExt
- Throws:
IOException
-
writeASCII
Description copied from interface:DataOutputExt
Writes a 0 terminated ASCII string to stream- Specified by:
writeASCII
in interfaceDataOutputExt
- Throws:
IOException
-