to.etc.domui.util.upload
Class HeaderParser

java.lang.Object
  extended by to.etc.domui.util.upload.HeaderParser

public class HeaderParser
extends java.lang.Object

This decodes the headers. Each header is on a separate line (where a line ends in CRLF). An empty line denotes the end of the header area. Each header has the format name: value CRLF

If a header name occurs twice the map will contain a List of the values.


Constructor Summary
HeaderParser()
           
 
Method Summary
 java.lang.String getProperty()
           
 java.lang.String getValue()
           
 void init(java.lang.String in)
           
 void parse(java.util.Map<java.lang.String,java.lang.Object> m, java.lang.String hdr, boolean lcnames)
           
 boolean parseNext()
          Parses the next header from the area.
 void setProperty(java.lang.String property)
           
 void setValue(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderParser

public HeaderParser()
Method Detail

getProperty

public final java.lang.String getProperty()

setProperty

public final void setProperty(java.lang.String property)

getValue

public final java.lang.String getValue()

setValue

public final void setValue(java.lang.String value)

init

public void init(java.lang.String in)

parseNext

public boolean parseNext()
Parses the next header from the area. Returns false if the line end has been reached.

Returns:

parse

public void parse(java.util.Map<java.lang.String,java.lang.Object> m,
                  java.lang.String hdr,
                  boolean lcnames)