|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataOutput
DataOutput is an interface which declares methods for writing typed data to a Stream. Typically, this stream can be read in by a class which implements DataInput. Types that can be written include byte, 16-bit short, 32-bit int, 32-bit float, 64-bit long, 64-bit double, byte strings, and UTF Strings.
DataOutputStream,
RandomAccessFile| Method Summary | |
|---|---|
void |
write(byte[] buffer)
Writes the entire contents of the byte array buffer to the
OutputStream. |
void |
write(byte[] buffer,
int offset,
int count)
Writes count bytes from the byte array
buffer starting at offset index to the
OutputStream. |
void |
write(int oneByte)
Writes the specified byte to the OutputStream. |
void |
writeBoolean(boolean val)
Writes a boolean to this output stream. |
void |
writeByte(int val)
Writes a 8-bit byte to this output stream. |
void |
writeBytes(String str)
Writes the low order 8-bit bytes from a String to this output stream. |
void |
writeChar(int oneByte)
Writes the specified 16-bit character to the OutputStream. |
void |
writeChars(String str)
Writes the specified 16-bit characters contained in str to the OutputStream. |
void |
writeDouble(double val)
Writes a 64-bit double to this output stream. |
void |
writeFloat(float val)
Writes a 32-bit float to this output stream. |
void |
writeInt(int val)
Writes a 32-bit int to this output stream. |
void |
writeLong(long val)
Writes a 64-bit long to this output stream. |
void |
writeShort(int val)
Writes the specified 16-bit short to the OutputStream. |
void |
writeUTF(String str)
Writes the specified String out in UTF format. |
| Method Detail |
|---|
void write(byte[] buffer)
throws IOException
buffer to the
OutputStream.
buffer - the buffer to be written
IOException - If an error occurs attempting to write to this stream.DataInput.readFully(byte[]),
DataInput.readFully(byte[], int, int)
void write(byte[] buffer,
int offset,
int count)
throws IOException
count bytes from the byte array
buffer starting at offset index to the
OutputStream.
buffer - the buffer to be writtenoffset - offset in buffer to get bytescount - number of bytes in buffer to write
IOException - If an error occurs attempting to write to this stream.DataInput.readFully(byte[]),
DataInput.readFully(byte[], int, int)
void write(int oneByte)
throws IOException
byte to the OutputStream.
oneByte - the byte to be written
IOException - If an error occurs attempting to write to this stream.DataInput.readByte()
void writeBoolean(boolean val)
throws IOException
val - the boolean value to write to the OutputStream
IOException - If an error occurs attempting to write to this stream.DataInput.readBoolean()
void writeByte(int val)
throws IOException
val - the byte value to write to the OutputStream
IOException - If an error occurs attempting to write to this stream.DataInput.readByte(),
DataInput.readUnsignedByte()
void writeBytes(String str)
throws IOException
str - the String containing the bytes to write to the OutputStream
IOException - If an error occurs attempting to write to this stream.DataInput.readFully(byte[]),
DataInput.readFully(byte[],int,int)
void writeChar(int oneByte)
throws IOException
oneByte - the character to be written
IOException - If an error occurs attempting to write to this stream.DataInput.readChar()
void writeChars(String str)
throws IOException
str - the String whose characters are to be written.
IOException - If an error occurs attempting to write to this stream.DataInput.readChar()
void writeDouble(double val)
throws IOException
val - the double to be written.
IOException - If an error occurs attempting to write to this stream.DataInput.readDouble()
void writeFloat(float val)
throws IOException
val - the float to be written.
IOException - If an error occurs attempting to write to this stream.DataInput.readFloat()
void writeInt(int val)
throws IOException
val - the int to be written.
IOException - If an error occurs attempting to write to this stream.DataInput.readInt()
void writeLong(long val)
throws IOException
val - the long to be written.
IOException - If an error occurs attempting to write to this stream.DataInput.readLong()
void writeShort(int val)
throws IOException
val - the short to be written
IOException - If an error occurs attempting to write to this stream.DataInput.readShort(),
DataInput.readUnsignedShort()
void writeUTF(String str)
throws IOException
str - the String to be written in UTF format.
IOException - If an error occurs attempting to write to this stream.DataInput.readUTF()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||