java.io
Class DataInputStream

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.io.InputStream sample code for java.io.InputStream definition code for java.io.InputStream 
      extended by java.io.FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream 
          extended by java.io.DataInputStream
All Implemented Interfaces:
Closeable sample code for java.io.Closeable definition code for java.io.Closeable , DataInput sample code for java.io.DataInput definition code for java.io.DataInput

public class DataInputStream
extends FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream
implements DataInput sample code for java.io.DataInput definition code for java.io.DataInput

A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.

Since:
JDK1.0
See Also:
DataOutputStream sample code for java.io.DataOutputStream definition code for java.io.DataOutputStream

Field Summary
 
Fields inherited from class java.io.FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream
in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in
 
Constructor Summary
DataInputStream sample code for java.io.DataInputStream.DataInputStream(java.io.InputStream) definition code for java.io.DataInputStream.DataInputStream(java.io.InputStream) (InputStream sample code for java.io.InputStream definition code for java.io.InputStream  in)
          Creates a DataInputStream that uses the specified underlying InputStream.
 
Method Summary
 int read sample code for java.io.DataInputStream.read(byte[]) definition code for java.io.DataInputStream.read(byte[]) (byte[] b)
          Reads some number of bytes from the contained input stream and stores them into the buffer array b.
 int read sample code for java.io.DataInputStream.read(byte[], int, int) definition code for java.io.DataInputStream.read(byte[], int, int) (byte[] b, int off, int len)
          Reads up to len bytes of data from the contained input stream into an array of bytes.
 boolean readBoolean sample code for java.io.DataInputStream.readBoolean() definition code for java.io.DataInputStream.readBoolean() ()
          See the general contract of the readBoolean method of DataInput.
 byte readByte sample code for java.io.DataInputStream.readByte() definition code for java.io.DataInputStream.readByte() ()
          See the general contract of the readByte method of DataInput.
 char readChar sample code for java.io.DataInputStream.readChar() definition code for java.io.DataInputStream.readChar() ()
          See the general contract of the readChar method of DataInput.
 double readDouble sample code for java.io.DataInputStream.readDouble() definition code for java.io.DataInputStream.readDouble() ()
          See the general contract of the readDouble method of DataInput.
 float readFloat sample code for java.io.DataInputStream.readFloat() definition code for java.io.DataInputStream.readFloat() ()
          See the general contract of the readFloat method of DataInput.
 void readFully sample code for java.io.DataInputStream.readFully(byte[]) definition code for java.io.DataInputStream.readFully(byte[]) (byte[] b)
          See the general contract of the readFully method of DataInput.
 void readFully sample code for java.io.DataInputStream.readFully(byte[], int, int) definition code for java.io.DataInputStream.readFully(byte[], int, int) (byte[] b, int off, int len)
          See the general contract of the readFully method of DataInput.
 int readInt sample code for java.io.DataInputStream.readInt() definition code for java.io.DataInputStream.readInt() ()
          See the general contract of the readInt method of DataInput.
 String sample code for java.lang.String definition code for java.lang.String readLine sample code for java.io.DataInputStream.readLine() definition code for java.io.DataInputStream.readLine() ()
          Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
 
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 
 long readLong sample code for java.io.DataInputStream.readLong() definition code for java.io.DataInputStream.readLong() ()
          See the general contract of the readLong method of DataInput.
 short readShort sample code for java.io.DataInputStream.readShort() definition code for java.io.DataInputStream.readShort() ()
          See the general contract of the readShort method of DataInput.
 int readUnsignedByte sample code for java.io.DataInputStream.readUnsignedByte() definition code for java.io.DataInputStream.readUnsignedByte() ()
          See the general contract of the readUnsignedByte method of DataInput.
 int readUnsignedShort sample code for java.io.DataInputStream.readUnsignedShort() definition code for java.io.DataInputStream.readUnsignedShort() ()
          See the general contract of the readUnsignedShort method of DataInput.
 String sample code for java.lang.String definition code for java.lang.String readUTF sample code for java.io.DataInputStream.readUTF() definition code for java.io.DataInputStream.readUTF() ()
          See the general contract of the readUTF method of DataInput.
static String sample code for java.lang.String definition code for java.lang.String readUTF sample code for java.io.DataInputStream.readUTF(java.io.DataInput) definition code for java.io.DataInputStream.readUTF(java.io.DataInput) (DataInput sample code for java.io.DataInput definition code for java.io.DataInput  in)
          Reads from the stream in a representation of a Unicode character string encoded in modified UTF-8 format; this string of characters is then returned as a String.
 int skipBytes sample code for java.io.DataInputStream.skipBytes(int) definition code for java.io.DataInputStream.skipBytes(int) (int n)
          See the general contract of the skipBytes method of DataInput.
 
Methods inherited from class java.io.FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream
available sample code for java.io.FilterInputStream.available() definition code for java.io.FilterInputStream.available() , close sample code for java.io.FilterInputStream.close() definition code for java.io.FilterInputStream.close() , mark sample code for java.io.FilterInputStream.mark(int) definition code for java.io.FilterInputStream.mark(int) , markSupported sample code for java.io.FilterInputStream.markSupported() definition code for java.io.FilterInputStream.markSupported() , read sample code for java.io.FilterInputStream.read() definition code for java.io.FilterInputStream.read() , reset sample code for java.io.FilterInputStream.reset() definition code for java.io.FilterInputStream.reset() , skip sample code for java.io.FilterInputStream.skip(long) definition code for java.io.FilterInputStream.skip(long)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

DataInputStream sample code for java.io.DataInputStream(java.io.InputStream) definition code for java.io.DataInputStream(java.io.InputStream)

public DataInputStream(InputStream sample code for java.io.InputStream definition code for java.io.InputStream  in)
Creates a DataInputStream that uses the specified underlying InputStream.

Parameters:
in - the specified input stream
Method Detail

read sample code for java.io.DataInputStream.read(byte[]) definition code for java.io.DataInputStream.read(byte[])

public final int read(byte[] b)
               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Reads some number of bytes from the contained input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

The read(b) method has the same effect as:

 read(b, 0, b.length) 
 

Overrides:
read sample code for java.io.FilterInputStream.read(byte[]) definition code for java.io.FilterInputStream.read(byte[]) in class FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream
Parameters:
b - the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in , InputStream.read(byte[], int, int) sample code for java.io.InputStream.read(byte[], int, int) definition code for java.io.InputStream.read(byte[], int, int)

read sample code for java.io.DataInputStream.read(byte[], int, int) definition code for java.io.DataInputStream.read(byte[], int, int)

public final int read(byte[] b,
                      int off,
                      int len)
               throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Reads up to len bytes of data from the contained input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.

This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len. Let k be the number of bytes actually read; these bytes will be stored in elements b[off] through b[off+k-1], leaving elements b[off+k] through b[off+len-1] unaffected.

In every case, elements b[0] through b[off] and elements b[off+len] through b[b.length-1] are unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

Overrides:
read sample code for java.io.FilterInputStream.read(byte[], int, int) definition code for java.io.FilterInputStream.read(byte[], int, int) in class FilterInputStream sample code for java.io.FilterInputStream definition code for java.io.FilterInputStream
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in , InputStream.read(byte[], int, int) sample code for java.io.InputStream.read(byte[], int, int) definition code for java.io.InputStream.read(byte[], int, int)

readFully sample code for java.io.DataInputStream.readFully(byte[]) definition code for java.io.DataInputStream.readFully(byte[])

public final void readFully(byte[] b)
                     throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readFully method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFully sample code for java.io.DataInput.readFully(byte[]) definition code for java.io.DataInput.readFully(byte[]) in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Parameters:
b - the buffer into which the data is read.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading all the bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readFully sample code for java.io.DataInputStream.readFully(byte[], int, int) definition code for java.io.DataInputStream.readFully(byte[], int, int)

public final void readFully(byte[] b,
                            int off,
                            int len)
                     throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readFully method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFully sample code for java.io.DataInput.readFully(byte[], int, int) definition code for java.io.DataInput.readFully(byte[], int, int) in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Parameters:
b - the buffer into which the data is read.
off - the start offset of the data.
len - the number of bytes to read.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading all the bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

skipBytes sample code for java.io.DataInputStream.skipBytes(int) definition code for java.io.DataInputStream.skipBytes(int)

public final int skipBytes(int n)
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the skipBytes method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
skipBytes sample code for java.io.DataInput.skipBytes(int) definition code for java.io.DataInput.skipBytes(int) in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Parameters:
n - the number of bytes to be skipped.
Returns:
the actual number of bytes skipped.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.

readBoolean sample code for java.io.DataInputStream.readBoolean() definition code for java.io.DataInputStream.readBoolean()

public final boolean readBoolean()
                          throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readBoolean method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readBoolean sample code for java.io.DataInput.readBoolean() definition code for java.io.DataInput.readBoolean() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the boolean value read.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream has reached the end.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readByte sample code for java.io.DataInputStream.readByte() definition code for java.io.DataInputStream.readByte()

public final byte readByte()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readByte method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readByte sample code for java.io.DataInput.readByte() definition code for java.io.DataInput.readByte() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next byte of this input stream as a signed 8-bit byte.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream has reached the end.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readUnsignedByte sample code for java.io.DataInputStream.readUnsignedByte() definition code for java.io.DataInputStream.readUnsignedByte()

public final int readUnsignedByte()
                           throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readUnsignedByte method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUnsignedByte sample code for java.io.DataInput.readUnsignedByte() definition code for java.io.DataInput.readUnsignedByte() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next byte of this input stream, interpreted as an unsigned 8-bit number.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream has reached the end.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readShort sample code for java.io.DataInputStream.readShort() definition code for java.io.DataInputStream.readShort()

public final short readShort()
                      throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readShort method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readShort sample code for java.io.DataInput.readShort() definition code for java.io.DataInput.readShort() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next two bytes of this input stream, interpreted as a signed 16-bit number.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading two bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readUnsignedShort sample code for java.io.DataInputStream.readUnsignedShort() definition code for java.io.DataInputStream.readUnsignedShort()

public final int readUnsignedShort()
                            throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readUnsignedShort method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUnsignedShort sample code for java.io.DataInput.readUnsignedShort() definition code for java.io.DataInput.readUnsignedShort() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next two bytes of this input stream, interpreted as an unsigned 16-bit integer.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading two bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readChar sample code for java.io.DataInputStream.readChar() definition code for java.io.DataInputStream.readChar()

public final char readChar()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readChar method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readChar sample code for java.io.DataInput.readChar() definition code for java.io.DataInput.readChar() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next two bytes of this input stream as a Unicode character.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading two bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readInt sample code for java.io.DataInputStream.readInt() definition code for java.io.DataInputStream.readInt()

public final int readInt()
                  throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readInt method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readInt sample code for java.io.DataInput.readInt() definition code for java.io.DataInput.readInt() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next four bytes of this input stream, interpreted as an int.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading four bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readLong sample code for java.io.DataInputStream.readLong() definition code for java.io.DataInputStream.readLong()

public final long readLong()
                    throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readLong method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readLong sample code for java.io.DataInput.readLong() definition code for java.io.DataInput.readLong() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next eight bytes of this input stream, interpreted as a long.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading eight bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readFloat sample code for java.io.DataInputStream.readFloat() definition code for java.io.DataInputStream.readFloat()

public final float readFloat()
                      throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readFloat method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readFloat sample code for java.io.DataInput.readFloat() definition code for java.io.DataInput.readFloat() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next four bytes of this input stream, interpreted as a float.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading four bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
readInt() sample code for java.io.DataInputStream.readInt() definition code for java.io.DataInputStream.readInt() , Float.intBitsToFloat(int) sample code for java.lang.Float.intBitsToFloat(int) definition code for java.lang.Float.intBitsToFloat(int)

readDouble sample code for java.io.DataInputStream.readDouble() definition code for java.io.DataInputStream.readDouble()

public final double readDouble()
                        throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readDouble method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readDouble sample code for java.io.DataInput.readDouble() definition code for java.io.DataInput.readDouble() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next eight bytes of this input stream, interpreted as a double.
Throws:
EOFException sample code for java.io.EOFException definition code for java.io.EOFException - if this input stream reaches the end before reading eight bytes.
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
readLong() sample code for java.io.DataInputStream.readLong() definition code for java.io.DataInputStream.readLong() , Double.longBitsToDouble(long) sample code for java.lang.Double.longBitsToDouble(long) definition code for java.lang.Double.longBitsToDouble(long)

readLine sample code for java.io.DataInputStream.readLine() definition code for java.io.DataInputStream.readLine()

@Deprecated
public final String sample code for java.lang.String definition code for java.lang.String  readLine()
                      throws IOException sample code for java.io.IOException definition code for java.io.IOException 
Deprecated. This method does not properly convert bytes to characters. As of JDK 1.1, the preferred way to read lines of text is via the BufferedReader.readLine() method. Programs that use the DataInputStream class to read lines can be converted to use the BufferedReader class by replacing code of the form:
     DataInputStream d = new DataInputStream(in);
 
with:
     BufferedReader d
          = new BufferedReader(new InputStreamReader(in));
 

See the general contract of the readLine method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readLine sample code for java.io.DataInput.readLine() definition code for java.io.DataInput.readLine() in interface DataInput sample code for java.io.DataInput definition code for java.io.DataInput
Returns:
the next line of text from this input stream.
Throws:
IOException sample code for java.io.IOException definition code for java.io.IOException - if an I/O error occurs.
See Also:
BufferedReader.readLine() sample code for java.io.BufferedReader.readLine() definition code for java.io.BufferedReader.readLine() , FilterInputStream.in sample code for java.io.FilterInputStream.in definition code for java.io.FilterInputStream.in

readUTF sample code for java.io.DataInputStream.readUTF() definition code for java.io.DataInputStream.readUTF()

public final String sample code for java.lang.String definition code for java.lang.String  readUTF()
                     throws IOException sample code for java.io.IOException definition code for java.io.IOException 
See the general contract of the readUTF method of DataInput.

Bytes for this operation are read from the contained input stream.

Specified by:
readUTF sample code for java.io.DataInput.readUTF() definition code for java.io.DataInput.readUTF() in interface DataInput