I think that you are somehow getting POST request contents without having access to the HTTPServletRequest object. In such a case one of the easier libraries to use is the Jakarta Commons FileUpload. Try using the MultiPartStream class, if required in conjunction with ParameterParser. The API docs can be found at http://jakarta.apache.org/commons/fileupload/apidocs/index.html
Do you need to do this in plain old Java or in a servlet container? I've done it in plain old Java. I import and use nothing that doesn't come in the JRE. It was entertaining right up to multi-part mime request and then it got tedious.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
If you'd look at the syntax of POST data, you'd see that it can be done with two StringTokenizers, the outer one with delimiter '&' and the inner one with "=". The strings will probably have to be decoded Ie + and &xx restored to whatever.