# Class HttpRequestParser (5.0.3)

    public class HttpRequestParser

`HttpRequestParser` encapsulates helper methods used to parse incoming `
multipart/form-data` HTTP requests. Subclasses should use these methods to parse specific
requests into useful data structures.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> HttpRequestParser

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### getFieldName(BodyPart part)

    protected static String getFieldName(BodyPart part)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `part` | `https://docs.oracle.com/javase/8/docs/api/javax/mail/BodyPart.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/javax/mail/MessagingException.html` |   |

### getTextContent(BodyPart part)

    protected static String getTextContent(BodyPart part)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `part` | `https://docs.oracle.com/javase/8/docs/api/javax/mail/BodyPart.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/javax/mail/MessagingException.html` |   |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseMultipartRequest(HttpServletRequest req)

    protected static MimeMultipart parseMultipartRequest(HttpServletRequest req)

Parse input stream of the given request into a MimeMultipart object.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `req` | `https://docs.oracle.com/javase/8/docs/api/javax/servlet/http/HttpServletRequest.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/javax/mail/internet/MimeMultipart.html` | A MimeMultipart object representing the POST data. |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` | if the input stream cannot be read. |
| `https://docs.oracle.com/javase/8/docs/api/javax/mail/MessagingException.html` | if the input stream cannot be read. |

## Constructors

### HttpRequestParser()

    public HttpRequestParser()