Fast LineInput InputStream. This buffered InputStream provides methods for reading lines of bytes. The lines can be converted to String or character arrays either using the default encoding or a user supplied encoding. Buffering and data copying are highly optimized, making this an ideal class for protocols that mix character encoding lines with arbitrary byte data (eg HTTP). The buffer size is also the maximum line length in bytes and/or characters. If the byte length of a line is less than the max, but the character length is greater, than then trailing characters are lost. Line termination is forgiving and accepts CR, LF, CRLF or EOF. Line input uses the mark/reset mechanism, so any marks set prior to a readLine call are lost.
@version $Id: LineInput.java,v 1.17 2005/10/05 11:32:40 gregwilkins Exp $
@author Greg Wilkins (gregw)
Fast LineInput InputStream. This buffered InputStream provides methods for reading lines of bytes. The lines can be converted to String or character arrays either using the default encoding or a user supplied encoding. Buffering and data copying are highly optimized, making this an ideal class for protocols that mix character encoding lines with arbitrary byte data (eg HTTP). The buffer size is also the maximum line length in bytes and/or characters. If the byte length of a line is less than the max, but the character length is greater, than then trailing characters are lost. Line termination is forgiving and accepts CR, LF, CRLF or EOF. Line input uses the mark/reset mechanism, so any marks set prior to a readLine call are lost.
@version $Id: LineInput.java,v 1.17 2005/10/05 11:32:40 gregwilkins Exp $
@author Greg Wilkins (gregw)
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.