WsContents
Last updated
Was this helpful?
Last updated
Was this helpful?
The WsContents
class represents the contents or parts of an HTTP request. It provides functionality to access metadata and content details of uploaded files or form data in a request. The contents include attributes such as the content name, field name, content type, size, and raw byte data. Additionally, it allows retrieval of the content as a string with a specified encoding.
Key methods include getName()
to get the content name, getFieldName()
to retrieve the field name, getContentType()
to access the MIME type, and getSize()
to get the content size in bytes. The class also provides methods like getBytes()
to obtain raw byte data and getString(encoding)
to convert the content into a string using a specified encoding.
Get contents bytes.
Get contents content type.
Get contents field name.
Get contents name.
Get contents size.
Get contents as string.
Get contents bytes.
Type
Sample
Get contents content type.
Sample
Get contents field name.
Sample
Get contents name.
Sample
Get contents size.
Sample
Get contents as string.
Sample
Type
Type
Type
Type
Type