public class RuntimeDataOutput
extends java.lang.Object
DataOutput
methods, converting
its IOExceptions to RuntimeExceptions.
The class provides two convenience methods that additionally check whether the written values are unsigned resp. signed short values before writing them.
Constructor and Description |
---|
RuntimeDataOutput(java.io.DataOutput dataOutput) |
Modifier and Type | Method and Description |
---|---|
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeSignedShort(int v)
Checks if the given value is a signed short value before writing it.
|
void |
writeUnsignedShort(int v)
Checks if the given value is an unsigned short value before writing it.
|
void |
writeUTF(java.lang.String str) |
public void write(byte[] b)
public void write(byte[] b, int off, int len)
public void write(int b)
public void writeBoolean(boolean v)
public void writeByte(int v)
public void writeBytes(java.lang.String s)
public void writeChar(int v)
public void writeChars(java.lang.String s)
public void writeDouble(double v)
public void writeFloat(float v)
public void writeInt(int v)
public void writeLong(long v)
public void writeUnsignedShort(int v)
java.lang.IllegalArgumentException
- if the value is not an unsigned short value.writeShort(int)
public void writeSignedShort(int v)
java.lang.IllegalArgumentException
- if the value is not a signed short value.writeShort(int)
public void writeShort(int v)
public void writeUTF(java.lang.String str)