public interface DataOutput extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
write(byte[] b)
Writes to the output stream all the bytes in array b.
|
void |
write(byte[] b,
int off,
int len)
Writes len bytes from array b, in order, to the output stream.
|
void |
write(int b)
Writes to the output stream the eight low-order bits of the argument b.
|
void |
writeBoolean(boolean v)
Writes a boolean value to this output stream.
|
void |
writeByte(int v)
Writes to the output stream the eight low- order bits of the argument v.
|
void |
writeChar(int v)
Writes a char value, which is comprised of two bytes, to the output stream.
|
void |
writeChars(String s)
Writes every character in the string s, to the output stream, in order, two bytes per character.
|
void |
writeDouble(double v)
Writes a double value, which is comprised of eight bytes, to the output stream.
|
void |
writeFloat(float v)
Writes a float value, which is comprised of four bytes, to the output stream.
|
void |
writeInt(int v)
Writes an int value, which is comprised of four bytes, to the output stream.
|
void |
writeLong(long v)
Writes an long value, which is comprised of four bytes, to the output stream.
|
void |
writeShort(int v)
Writes two bytes to the output stream to represent the value of the argument.
|
void |
writeUTF(String s)
Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s.
|
closevoid write(byte[] b)
throws IOException
IOExceptionvoid write(byte[] b,
int off,
int len)
throws IOException
IOExceptionvoid write(int b)
throws IOException
IOExceptionvoid writeBoolean(boolean v)
throws IOException
IOExceptionvoid writeByte(int v)
throws IOException
IOExceptionvoid writeChar(int v)
throws IOException
IOExceptionvoid writeChars(String s) throws IOException
IOExceptionvoid writeDouble(double v)
throws IOException
IOExceptionvoid writeFloat(float v)
throws IOException
IOExceptionvoid writeInt(int v)
throws IOException
IOExceptionvoid writeLong(long v)
throws IOException
IOExceptionvoid writeShort(int v)
throws IOException
IOExceptionvoid writeUTF(String s) throws IOException
IOException