public class DataOutput
extends java.io.DataOutputStream
DataOutputStream with additional convenience methods.| Constructor and Description |
|---|
DataOutput(java.io.OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
int |
writeInt(int value,
boolean optimizePositive)
Writes a 1-5 byte int.
|
void |
writeString(java.lang.String value)
Writes a length and then the string as UTF8.
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFpublic int writeInt(int value,
boolean optimizePositive)
throws java.io.IOException
optimizePositive - If true, small positive numbers will be more efficient (1 byte) and small negative numbers will be
inefficient (5 bytes).java.io.IOExceptionpublic void writeString(java.lang.String value)
throws java.io.IOException
value - May be null.java.io.IOException