All About INTERFACE DataInput In java



The DataInput interface is implemented by streams that can read primitive java data types from a Stream in a machine dependent manner.
The interface DataInput is given as:

public interface java.io.DataInput{
//methods:
public abstract boolean readBoolean();
public abstract byte readByte();
public abstract char readChar();
public abstract double readDouble();
public abstract float readFloat();
public abstract void readFully(byte b[])
public abstract void readFully(byte b[],int offSet,int length);
public abstract int readInt();
public abstract String readLine();
public abstract long readLong();
public abstract short readShort();
public abstract int readUnsignedByte();
public abstract int readUnsignedShort();
public abstract String readUTF();
public abstract int skipBytes(int n);
}
 
All these methods can throw EOFException if this stream reaches the end before skipping all bytes also can throw IOException if an I/O error occurs.
All About INTERFACE DataInput In java All About INTERFACE DataInput In java Reviewed by Animesh Chatterjee on October 11, 2018 Rating: 5

No comments:

Powered by Blogger.