java.io.Closeable
, java.lang.AutoCloseable
public class LineInputStream
extends java.io.FilterInputStream
DataInputStream.readLine()
. Expected use is to read
lines as String objects from a RFC822 stream.
It is implemented as a FilterInputStream, so one can just wrap
this class around any input stream and read bytes from this filter.Constructor | Description |
---|---|
LineInputStream(java.io.InputStream in) |
|
LineInputStream(java.io.InputStream in,
boolean allowutf8) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
readLine() |
Read a line containing only ASCII characters from the input
stream.
|
public LineInputStream(java.io.InputStream in)
public LineInputStream(java.io.InputStream in, boolean allowutf8)
in
- the InputStreamallowutf8
- allow UTF-8 characters?public java.lang.String readLine() throws java.io.IOException
This class is similar to the deprecated
DataInputStream.readLine()
java.io.IOException
- for I/O errorsCopyright © 2018 Oracle. All rights reserved.