rabbit.proxy
Class LineReader

java.lang.Object
  extended by rabbit.proxy.LineReader

public class LineReader
extends Object

A class that reads lines from a ByteBuffer.

Author:
Robert Olofsson

Constructor Summary
LineReader(boolean strictHttp)
           
 
Method Summary
 void readLine(ByteBuffer buffer, LineListener listener)
          Try to read a line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineReader

public LineReader(boolean strictHttp)
Method Detail

readLine

public void readLine(ByteBuffer buffer,
                     LineListener listener)
              throws IOException
Try to read a line. If a line ending is found the buffers mark is set to the next position.

Parameters:
buffer - the ByteBuffer to read bytes from.
listener - the line listener.
Throws:
IOException