superwaba.ext.xplat.util.xml
Class HttpLiteParser
java.lang.Object
|
+--superwaba.ext.xplat.util.xml.LiteParser
|
+--superwaba.ext.xplat.util.xml.HttpLiteParser
- public class HttpLiteParser
- extends LiteParser
Listener that must be extended to process the events thrown by HttpLiteParser.
parses a HTTP header. State 0 indicates that the header has been read and
the buffer may be left pointing at any content.
Method Summary |
void |
parse(byte[] input,
int size)
This method parses the given array of bytes.
|
void |
parse(StreamBuffer sbuf)
Parse a Stream Buffer |
void |
parse(Stream input,
int bufferSize)
This method parses the bytes from the passed stream. |
protected void |
parseBuffer(byte[] input,
int size)
|
httpListener
protected HttpListener httpListener
eol
protected byte eol
HttpLiteParser
public HttpLiteParser(HttpListener listener)
- Constructor.
- Parameters:
listener
-
parse
public void parse(Stream input,
int bufferSize)
throws ParserException
- This method parses the bytes from the passed stream.
- Parameters:
input
- Input stream.bufferSize
- The bufer size to use. No tag or content can be
larger than the buffer.- Throws:
- ParserException -
parse
public void parse(StreamBuffer sbuf)
throws ParserException
- Parse a Stream Buffer
- Parameters:
sbuff
- A buffer that can be refilled from a stream- Throws:
- ParserException -
parse
public void parse(byte[] input,
int size)
throws ParserException
- This method parses the given array of bytes.
The algorithm is based on DFA (Deterministic Finite Automata) theory and
Regular Expression theory.
- Parameters:
input
- The input byte array.size
- The size of bytes to be parsed. Normally should be input.length
parseBuffer
protected void parseBuffer(byte[] input,
int size)
throws ParserException
- Parameters:
size
- - Throws:
- ParserException -