DataOutputStream
public
class
DataOutputStream
extends FilterOutputStream
implements
DataOutput
| java.lang.Object | |||
| ↳ | java.io.OutputStream | ||
| ↳ | java.io.FilterOutputStream | ||
| ↳ | java.io.DataOutputStream | ||
A data output stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in.
See also:
Summary
Fields | |
|---|---|
protected
int |
written
The number of bytes written to the data output stream so far. |
Inherited fields |
|---|
Public constructors | |
|---|---|
DataOutputStream(OutputStream out)
Creates a new data output stream to write data to the specified underlying output stream. |
|
Public methods | |
|---|---|
void
|
flush()
Flushes this data output stream. |
final
int
|
size()
Returns the current value of the counter |
void
|
write(byte[] b, int off, int len)
Writes |
void
|
write(int b)
Writes the specified byte (the low eight bits of the argument
|
final
void
|
writeBoolean(boolean v)
Writes a |
final
void
|
writeByte(int v)
Writes out a |
final
void
|
writeBytes(String s)
Writes out the string to the underlying output stream as a sequence of bytes. |
final
void
|
writeChar(int v)
Writes a |
final
void
|
writeChars(String s)
Writes a string to the underlying output stream as a sequence of characters. |
final
void
|
writeDouble(double v)
Converts the double argument to a |