#

| Chapter 24 The java.io Package |

## 24.10 java.io.DataInput (JDK 1.0)

###

This interface defines the methods required for streams that can read Java primitive data types in a machine-independent binary format. It is implemented by `DataInputStream` and `RandomAccessFile`. See `DataInputStream` for more information on the methods.

    public abstract interface DataInput {
        // Public Instance Methods
                public abstract boolean readBoolean() throws IOException;
                public abstract byte readByte() throws IOException;
                public abstract char readChar() throws IOException;
                public abstract double readDouble() throws IOException;
                public abstract float readFloat() throws IOException;
                public abstract void readFully(byte[] b) throws IOException;
                public abstract void readFully(byte[] b, int off, int len) throws IOException;
                public abstract int readInt() throws IOException;
                public abstract String readLine() throws IOException;
                public abstract long readLong() throws IOException;
                public abstract short readShort() throws IOException;
                public abstract String readUTF() throws IOException;
                public abstract int readUnsignedByte() throws IOException;
                public abstract int readUnsignedShort() throws IOException;
                public abstract int skipBytes(int n) throws IOException;
    }

### Extended By:

ObjectInput

### Implemented By:

DataInputStream, RandomAccessFile

### Passed To:

DataInputStream.readUTF()

java.io.CharConversionException (JDK 1.1) |  | java.io.DataInputStream (JDK 1.0)