public class DataOutputStreamBI extends DataOutputStream implements 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)
written
out
Constructor and Description |
---|
DataOutputStreamBI(OutputStream is) |
Modifier and Type | Method and Description |
---|---|
void |
writeASCII(String s)
Writes a 0 terminated ASCII string to stream
|
void |
writeUnsignedByte(short v)
Writes the lowest significant byte of the given
short value as an unsigned byte
|
void |
writeUnsignedInt(long v)
Writes the 4 lowest significant bytes of the given
long value as an unsigned int
|
void |
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 short
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
close, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, flush
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
public DataOutputStreamBI(OutputStream is)
public void writeUnsignedByte(short v) throws IOException
DataOutputExt
writeUnsignedByte
in interface DataOutputExt
IOException
public void writeUnsignedShort(int v) throws IOException
DataOutputExt
writeUnsignedShort
in interface DataOutputExt
IOException
public void writeUnsignedInt(long v) throws IOException
DataOutputExt
writeUnsignedInt
in interface DataOutputExt
IOException
public void writeUnsignedLong(long v) throws IOException
DataOutputExt
writeUnsignedLong
in interface DataOutputExt
IOException
public void writeASCII(String s) throws IOException
DataOutputExt
writeASCII
in interface DataOutputExt
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.