java.io
Class DataInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.DataInputStream
- All Implemented Interfaces:
- DataInput
public class DataInputStream
- extends FilterInputStream
- implements DataInput
Reads java data types transmitted as bytes over an InputStream.
- Author:
- Sven Köhler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataInputStream
public DataInputStream(InputStream in)
readBoolean
public final boolean readBoolean()
throws IOException
- Specified by:
readBoolean
in interface DataInput
- Throws:
IOException
readByte
public final byte readByte()
throws IOException
- Specified by:
readByte
in interface DataInput
- Throws:
IOException
readChar
public final char readChar()
throws IOException
- Specified by:
readChar
in interface DataInput
- Throws:
IOException
readDouble
public final double readDouble()
throws IOException
- Specified by:
readDouble
in interface DataInput
- Throws:
IOException
readFloat
public final float readFloat()
throws IOException
- Specified by:
readFloat
in interface DataInput
- Throws:
IOException
readFully
public final void readFully(byte[] b)
throws IOException
- Specified by:
readFully
in interface DataInput
- Throws:
IOException
readFully
public final void readFully(byte[] b,
int off,
int len)
throws IOException
- Specified by:
readFully
in interface DataInput
- Throws:
IOException
readInt
public final int readInt()
throws IOException
- Specified by:
readInt
in interface DataInput
- Throws:
IOException
readLong
public final long readLong()
throws IOException
- Specified by:
readLong
in interface DataInput
- Throws:
IOException
readShort
public final short readShort()
throws IOException
- Specified by:
readShort
in interface DataInput
- Throws:
IOException
readUnsignedByte
public final int readUnsignedByte()
throws IOException
- Specified by:
readUnsignedByte
in interface DataInput
- Throws:
IOException
readUnsignedShort
public final int readUnsignedShort()
throws IOException
- Specified by:
readUnsignedShort
in interface DataInput
- Throws:
IOException
readUTF
public final String readUTF()
throws IOException
- Specified by:
readUTF
in interface DataInput
- Throws:
IOException
readUTF
public static final String readUTF(DataInput in)
throws IOException
- Throws:
IOException
skipBytes
public final int skipBytes(int n)
throws IOException
- Specified by:
skipBytes
in interface DataInput
- Throws:
IOException
readLine
@Deprecated
public final String readLine()
throws IOException
- Deprecated. broken in various ways, use BufferedReader.readLine instead
- Deprecated. This method assumes ISO-8859-1 encoding and does only recognize \n and \r\n line-endings.
- Specified by:
readLine
in interface DataInput
- Throws:
IOException