com.sun.mail.util
类 LineInputStream

java.lang.Object
  继承者 java.io.InputStream
      继承者 java.io.FilterInputStream
          继承者 com.sun.mail.util.LineInputStream
所有已实现的接口:
Closeable

public class LineInputStream
extends FilterInputStream

This class is to support reading CRLF terminated lines that contain only US-ASCII characters from an input stream. Provides functionality that is similar to the deprecated 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.

作者:
John Mani

字段摘要
 
从类 java.io.FilterInputStream 继承的字段
in
 
构造方法摘要
LineInputStream(InputStream in)
           
 
方法摘要
 String readLine()
          Read a line containing only ASCII characters from the input stream.
 
从类 java.io.FilterInputStream 继承的方法
available, close, mark, markSupported, read, read, read, reset, skip
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

LineInputStream

public LineInputStream(InputStream in)
方法详细信息

readLine

public String readLine()
                throws IOException
Read a line containing only ASCII characters from the input stream. A line is terminated by a CR or NL or CR-NL sequence. A common error is a CR-CR-NL sequence, which will also terminate a line. The line terminator is not returned as part of the returned String. Returns null if no data is available.

This class is similar to the deprecated DataInputStream.readLine()

抛出:
IOException


Copyright © 2013. All Rights Reserved.