DataInputStream.ReadLine Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
deprecated
See the general contract of the readLine
method of DataInput
.
[Android.Runtime.Register("readLine", "()Ljava/lang/String;", "")]
[System.Obsolete("deprecated")]
public string? ReadLine ();
[<Android.Runtime.Register("readLine", "()Ljava/lang/String;", "")>]
[<System.Obsolete("deprecated")>]
abstract member ReadLine : unit -> string
override this.ReadLine : unit -> string
Returns
the next line of text from this input stream.
Implements
- Attributes
Exceptions
Remarks
See the general contract of the readLine
method of DataInput
.
Bytes for this operation are read from the contained input stream.
This member is 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: <blockquote><pre> DataInputStream d = new DataInputStream(in); </pre></blockquote> with: <blockquote><pre> BufferedReader d = new BufferedReader(new InputStreamReader(in)); </pre></blockquote>
Java documentation for java.io.DataInputStream.readLine()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.