Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.io

Interface DataOutput

java.lang.Object
|
+--java.io.DataOutput


public interface DataOutput

This interface is implemented by classes that can wrte data to streams from Java primitive types.

Authors:

Method Summary

voidwrite(int value)

This method writes an 8-bit value (passed into the method as a Java int) to an output stream.
voidwrite(byte[] buf)

This method writes the raw byte array passed in to the output stream.
voidwrite(byte[] buf, int offset, int len)

This method writes raw bytes from the passed array buf starting offset bytes into the buffer.
voidwriteBoolean(boolean value)

This method writes a Java boolean value to an output stream
voidwriteByte(int value)

This method writes a Java byte value to an output stream
voidwriteBytes(java.lang.String value)

This method writes a String to an output stream as an array of bytes
voidwriteChar(int value)

This method writes a Java char value to an output stream
voidwriteChars(java.lang.String value)

This method writes a String to an output stream as an array of char's
voidwriteDouble(double value)

This method writes a Java double value to an output stream
voidwriteFloat(float value)

This method writes a Java float value to an output stream
voidwriteInt(int value)

This method writes a Java int value to an output stream
voidwriteLong(long value)

This method writes a Java long value to an output stream
voidwriteShort(int value)

This method writes a Java int value to an output stream as a 16 bit value
voidwriteUTF(java.lang.String value)

This method writes a String to an output stream encoded in UTF-8 format.

Method Details

write

public void write(byte[] buf)

This method writes the raw byte array passed in to the output stream.

Parameters:

Throws:


write

public void write(byte[] buf, int offset, int len)

This method writes raw bytes from the passed array buf starting offset bytes into the buffer. The number of bytes written will be exactly len.

Parameters:

Throws:


write

public void write(int value)

This method writes an 8-bit value (passed into the method as a Java int) to an output stream.

Parameters:

Throws:


writeBoolean

public void writeBoolean(boolean value)

This method writes a Java boolean value to an output stream

Parameters:

Throws:


writeByte

public void writeByte(int value)

This method writes a Java byte value to an output stream

Parameters:

Throws:


writeBytes

public void writeBytes(java.lang.String value)

This method writes a String to an output stream as an array of bytes

Parameters:

Throws:


writeChar

public void writeChar(int value)

This method writes a Java char value to an output stream

Parameters:

Throws:


writeChars

public void writeChars(java.lang.String value)

This method writes a String to an output stream as an array of char's

Parameters:

Throws:


writeDouble

public void writeDouble(double value)

This method writes a Java double value to an output stream

Parameters:

Throws:


writeFloat

public void writeFloat(float value)

This method writes a Java float value to an output stream

Parameters:

Throws:


writeInt

public void writeInt(int value)

This method writes a Java int value to an output stream

Parameters:

Throws:


writeLong

public void writeLong(long value)

This method writes a Java long value to an output stream

Parameters:

Throws:


writeShort

public void writeShort(int value)

This method writes a Java int value to an output stream as a 16 bit value

Parameters:

Throws:


writeUTF

public void writeUTF(java.lang.String value)

This method writes a String to an output stream encoded in UTF-8 format.

Parameters:

Throws: