Public abstract class DataInputStream extends FilterInputStream implements DataInput
Constructor | Description |
---|---|
DataInputStream(InputStream in) | The function of this constructor is to create the data input stream instance and used to read from input stream. |
Method | Description |
---|---|
int read (byte[] b) | By using this method it reads the data up to b.length bytes from the input stream. |
void read fully(byte[] b) | The function of this method is to read the bytes from the input stream and store in array buffer. |
int skipBytes(int n) | From the input stream this method skips over and throw out ‘n’ bytes of data. |
int read(byte[] b, int off, int n) | By using this method it reads the data up to 'n' bytes from the input stream to an array of the bytes. |
String readUTF() | The function of this method is to read the content in the string format and have encoded by UTF-8 format. |
int readInt() | The function of this method is to read 4- bytes from input stream. |