ikrs.httpd
Interface PostDataWrapper

All Known Implementing Classes:
AbstractPostDataWrapper, DefaultPostDataWrapper

public interface PostDataWrapper


Method Summary
 long getBytePosition()
          Get the current read position.
 long getContentLength()
          Get the post data's designated content length.
 java.io.InputStream getInputStream()
          Get the input stream associated with this post data.
 HTTPHeaders getRequestHeaders()
          Get the HTTP headers assiciated with this post data.
 ikrs.httpd.datatype.FormData readFormData()
          ??? Is it a good idea to place the form data parser here ??? !!! The POST form data is more part of MIME instead of HTTP ...
 

Method Detail

getRequestHeaders

HTTPHeaders getRequestHeaders()
Get the HTTP headers assiciated with this post data. The returned headers are never null (but may be empty).

Returns:
The HTTP headers assiciated with this post data.

getContentLength

long getContentLength()
Get the post data's designated content length. If the content length is unknown or not available the method should return -1;

Returns:
The content length (in bytes) or -1 if the lenght is unknown.

getInputStream

java.io.InputStream getInputStream()
Get the input stream associated with this post data. Use it to read the data you are interested in; the returned stream is never null.

Returns:
The input stream to read the actual post data from.

getBytePosition

long getBytePosition()
Get the current read position. The input stream is backed to a BytePositionInputStream that keeps track of the read position inside the stream. The position is measured from the first byte of post data (header data not included).

Returns:
The current read position of the post data input stream.

readFormData

ikrs.httpd.datatype.FormData readFormData()
                                          throws java.io.IOException,
                                                 HeaderFormatException,
                                                 DataFormatException,
                                                 UnsupportedFormatException
??? Is it a good idea to place the form data parser here ??? !!! The POST form data is more part of MIME instead of HTTP ...

Throws:
java.io.IOException
HeaderFormatException
DataFormatException
UnsupportedFormatException