All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.io.OutputStream
|
+----java.io.FilterOutputStream
|
+----java.io.DataOutputStream
len
bytes from the specified byte array
starting at offset off
to the underlying output stream.
boolean
to the underlying output stream as
a 1-byte value.
byte
to the underlying output stream as
a 1-byte value.
char
to the underlying output stream as a
2-byte value, high byte first.
long
using the
doubleToLongBits
method in class Double
,
and then writes that long
value to the underlying
output stream as an 8-byte quantity, high byte first.
int
using the
floatToIntBits
method in class Float
,
and then writes that int
value to the underlying
output stream as a 4-byte quantity, high byte first.
int
to the underlying output stream as four
bytes, high byte first.
long
to the underlying output stream as eight
bytes, high byte first.
short
to the underlying output stream as two
bytes, high byte first.
protected int written
public DataOutputStream(OutputStream out)
public synchronized void write(int b) throws IOException
byte
to be written.
public synchronized void write(byte b[],
int off,
int len) throws IOException
len
bytes from the specified byte array
starting at offset off
to the underlying output stream.
public void flush() throws IOException
The flush
method of DataOuputStream
calls the flush
method of its underlying output stream.
public final void writeBoolean(boolean v) throws IOException
boolean
to the underlying output stream as
a 1-byte value. The value true
is written out as the
value (byte)1
; the value false
is
written out as the value (byte)0
.
boolean
value to be written.
public final void writeByte(int v) throws IOException
byte
to the underlying output stream as
a 1-byte value.
byte
value to be written.
public final void writeShort(int v) throws IOException
short
to the underlying output stream as two
bytes, high byte first.
short
to be written.
public final void writeChar(int v) throws IOException
char
to the underlying output stream as a
2-byte value, high byte first.
char
value to be written.
public final void writeInt(int v) throws IOException
int
to the underlying output stream as four
bytes, high byte first.
int
to be written.
public final void writeLong(long v) throws IOException
long
to the underlying output stream as eight
bytes, high byte first.
long
to be written.
public final void writeFloat(float v) throws IOException
int
using the
floatToIntBits
method in class Float
,
and then writes that int
value to the underlying
output stream as a 4-byte quantity, high byte first.
float
value to be written.
public final void writeDouble(double v) throws IOException
long
using the
doubleToLongBits
method in class Double
,
and then writes that long
value to the underlying
output stream as an 8-byte quantity, high byte first.
double
value to be written.
public final void writeBytes(String s) throws IOException
public final void writeChars(String s) throws IOException
writeChar
method.
String
value to be written.
public final void writeUTF(String str) throws IOException
First, two bytes are written to the output stream as if by the
writeShort
method giving the number of bytes to
follow. This value is the number of bytes actually written out,
not the length of the string. Following the length, each character
of the string is output, in sequence, using the UTF-8 encoding
for the character.
public final int size()
written
field.
All Packages Class Hierarchy This Package Previous Next Index