|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object php.java.bridge.http.HeaderParser
public abstract class HeaderParser
A procedure class which can be used to capture the HTTP header strings.
Example:
Util.parseBody(buf, natIn, out, new Util.HeaderParser() {protected void parseHeader(String header) {System.out.println(header);}});
parseBody(byte[], InputStream, OutputStreamFactory, HeaderParser)
Field Summary | |
---|---|
static HeaderParser |
DEFAULT_HEADER_PARSER
The default CGI header parser. |
Constructor Summary | |
---|---|
HeaderParser()
|
Method Summary | |
---|---|
abstract void |
addHeader(java.lang.String key,
java.lang.String val)
Add a header |
static void |
parseBody(byte[] buf,
java.io.InputStream natIn,
OutputStreamFactory out,
HeaderParser parser)
Discards all header fields from a HTTP connection and write the body to the OutputStream |
abstract void |
parseHeader(java.lang.String header)
Parse a header |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final HeaderParser DEFAULT_HEADER_PARSER
Constructor Detail |
---|
public HeaderParser()
Method Detail |
---|
public abstract void parseHeader(java.lang.String header)
header
- The header string to parsepublic abstract void addHeader(java.lang.String key, java.lang.String val)
key
- the keyval
- the valuepublic static void parseBody(byte[] buf, java.io.InputStream natIn, OutputStreamFactory out, HeaderParser parser) throws java.io.UnsupportedEncodingException, java.io.IOException
buf
- A buffer, for example new byte[BUF_SIZE]natIn
- The InputStreamout
- The OutputStreamparser
- The header parser
java.io.UnsupportedEncodingException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |