public class HeaderUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACCEPT
The standard HTTP 'Accept' header.
|
static String |
CONTENT_DISPOSITION
The standard HTTP 'Content-Disposition' header.
|
static String |
CONTENT_ENCODING
The standard HTTP 'Content-Encoding' header.
|
static String |
CONTENT_EXPIRATION
The standard HTTP 'Content-Expiration' header.
|
static String |
CONTENT_LOCATION
The standard HTTP 'Content-Location' header.
|
static String |
CONTENT_TYPE
The standard HTTP 'Content-Type' header.
|
Modifier and Type | Method and Description |
---|---|
static String |
createContentDispositionValue(File file)
Returns a HTTP 'Content-Disposition' header value for the specified file.
|
static String |
createContentDispositionValue(String filename)
Returns a HTTP 'Content-Disposition' header value for the specified file name.
|
static String |
getContentDispositionFilename(String value)
Returns the file name set as 'Content-Disposition' header value.
|
public static final String ACCEPT
public static final String CONTENT_TYPE
public static final String CONTENT_DISPOSITION
public static final String CONTENT_ENCODING
public static final String CONTENT_LOCATION
public static final String CONTENT_EXPIRATION
public static String createContentDispositionValue(String filename)
filename
- the file name to set as a 'Content-Disposition' header valuepublic static String createContentDispositionValue(File file)
file
- the file to set as a 'Content-Disposition' header valuepublic static String getContentDispositionFilename(String value)
value
- the 'Content-Disposition' header value.null
if none.