public class DataOutputStreamEx extends DataOutputStream
DataOutputStreamwrittenout| Constructor and Description |
|---|
DataOutputStreamEx(OutputStream os)
Creates a new data output stream ex from the underlying output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
writeBytes(byte[] b)
Writes a byte array (not a string) to this stream.
|
void |
writeString(String s)
A more correct name for writeBytes.
|
void |
writeString0(String s)
Write a string to this stream and null terminate it.
|
void |
writeStringL(String s)
Write a byte prefixed string to this stream.
|
void |
writeStringLL(String s)
Write a short prefixed string to this stream.
|
void |
writeStringLL0(String s)
Write a short prefixed null-terminated string to this stream.
|
void |
writeStringNullPadded(String s,
int length)
Write a null padded string to this stream.
|
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFclose, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic DataOutputStreamEx(OutputStream os)
os - the underlying output streampublic void writeString(String s) throws IOException
s - the string to writeIOException - if an error occurspublic void writeBytes(byte[] b)
throws IOException
b - the byte arrayIOException - if an error occurspublic void writeString0(String s) throws IOException
s - the stringIOException - if an error occurspublic void writeStringL(String s) throws IOException
s - the stringIOException - if an error occurspublic void writeStringLL(String s) throws IOException
s - the stringIOException - if an error occurspublic void writeStringLL0(String s) throws IOException
s - the stringIOException - if an error occurspublic void writeStringNullPadded(String s, int length) throws IOException
s - the stringlength - the total length the padded string should beIOException - if an error occurs