All about INTERFACE DataOutput in Java



The DataOutput inerface is implemented by streams which can write primitive data types to an output stream in a machine independent manner.

The structure of the DataOutput interface is given as:

public interface java.io.DataOutput{
//methods
public abstract void write(byte b[]);
public abstract void write(byte b[],int offSet,int length);
public abstract void write(int i);
public abstract void writeBoolean(boolean b);
public abstract void writeByte(int v);
public abstract void writeBytes(String s);
public abstract void writeChar(int b);
public abstract void writeChars(String s);
public abstract void writeDouble(double d);
public abstract void writeFloat(float f);
public abstract void writeInt(int b);
public abstract void writeLong(long l);
public abstract void writeShort(int b);
public abstract void writeUTF(string str);
}
 
In addition,all methods may throw an IOException if an IO error occurs apart from their regular Exceptions.
All about INTERFACE DataOutput in Java All about INTERFACE DataOutput in Java Reviewed by Animesh Chatterjee on October 12, 2018 Rating: 5

No comments:

Powered by Blogger.