ikrs.util
Class CRLFLineReader

java.lang.Object
  extended by ikrs.util.CRLFLineReader

public class CRLFLineReader
extends java.lang.Object

This class can be used to read clean CR-LF (0xD, 0xA) line feeded text. Other line breaks will be taken as 'normal' text.


Constructor Summary
CRLFLineReader()
           
 
Method Summary
static java.lang.String readLine(java.io.InputStream in)
          Read the next CR-LF line from the input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRLFLineReader

public CRLFLineReader()
Method Detail

readLine

public static java.lang.String readLine(java.io.InputStream in)
                                 throws java.io.EOFException,
                                        java.io.IOException
Read the next CR-LF line from the input stream. Note that only CR-LF is accepted as an entity line break! Single CR single LF will _not_ instruct the reader to stop! Hint: If the read line is empty this method will return null!

Parameters:
in - The InputStream to read from.
EOFException - if the end of the stream was reached without getting the fianl CR-LF.
IOException - If any other IO errors occur.
Returns:
The next read line or null if the line was empty.
Throws:
java.io.EOFException
java.io.IOException