juju.reattore.protocol.http
Interface HttpParser

All Known Implementing Classes:
BasicHttpParser

public interface HttpParser

Stateful HTTP parser that will parse blocks of bytes as they are fed in.


Method Summary
 java.util.List add(ByteSource source)
          Takes the next set of data and parses it into headers and body as the data is made available.
 

Method Detail

add

public java.util.List add(ByteSource source)
                   throws ParseException,
                          java.io.IOException
Takes the next set of data and parses it into headers and body as the data is made available. Returns a list of all of the messages just parsed as HttpRequests objects. Will be empty if more data is needed.

Parameters:
source - A source to read from. Not all data may be read.
Returns:
A list of all of the messages parsed due to adding this data. Never null.
Throws:
ParseException - if an error occurs while parsing.
java.io.IOException - on error.


Copyright © 2002-2003 Michael Hope. All Rights Reserved.