DataInputStream.readLine

See the general contract of the <code>readLine</code> method of <code>DataInput</code>. <p> Bytes for this operation are read from the contained input stream.

@deprecated This method does not properly convert bytes to characters. As of JDK&nbsp;1.1, the preferred way to read lines of text is via the <code>BufferedReader.readLine()</code> method. Programs that use the <code>DataInputStream</code> class to read lines can be converted to use the <code>BufferedReader</code> class by replacing code of the form: <blockquote><pre> DataInputStream d =&nbsp;new&nbsp;DataInputStream(inputStream); </pre></blockquote> with: <blockquote><pre> BufferedReader d =&nbsp;new&nbsp;BufferedReader(new&nbsp;InputStreamReader(inputStream)); </pre></blockquote>

@return the next line of text from this input stream. @exception IOException if an I/O error occurs. @see java.io.BufferedReader#readLine() @see java.io.FilterInputStream#inputStream

class DataInputStream
final
string
readLine
()

Meta