public class ProtocolUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TRANSFER_ENCODING_HDR |
static String |
CONTENT_TYPE_HDR |
static String |
DEFAULT_BINARY_CONTENT_TYPE |
static String |
DEFAULT_ENCODING |
static String |
HTML_CONTENT_TYPE |
static String |
TEXT_CONTENT_TYPE |
| Constructor and Description |
|---|
ProtocolUtils() |
| Modifier and Type | Method and Description |
|---|---|
String |
contentTypeWithCharset(String contentType)
Returns the string value for the Content-Type header with the 'charset' directive.
|
String |
contentTypeWithCharset(String contentType,
Charset charset)
Returns the string value for the Content-Type header with the 'charset' directive.
|
String |
contentTypeWithCharset(String contentType,
String charset)
Returns the string value for the Content-Type header with the 'charset' directive.
|
String |
defineCharsetFromHeaderValue(String contentTypeValue)
Returns value from 'charset' directive from a Content-Type header value.
|
public static final String CONTENT_TYPE_HDR
public static final String CONTENT_TRANSFER_ENCODING_HDR
public static final String DEFAULT_ENCODING
public static final String TEXT_CONTENT_TYPE
public static final String HTML_CONTENT_TYPE
public static final String DEFAULT_BINARY_CONTENT_TYPE
public String contentTypeWithCharset(String contentType, Charset charset)
contentTypeWithCharset(String, String)public String contentTypeWithCharset(String contentType, String charset)
contentType - data for the 'media-type' directive. A MIME type of resource.charset - the charset encoding standard.public String contentTypeWithCharset(String contentType)
DEFAULT_ENCODING constant valuecontentType - data for the 'media-type' directive. A MIME type of resource.Copyright © 2023. All rights reserved.