public class RFC2231 extends Object
Content-Disposition
's filename
, can be encoded to
contain arbitrary character sets.Modifier and Type | Method and Description |
---|---|
static String |
encodeContentDisposition(String filename,
boolean inline,
String userAgent)
Encodes a
Content-Disposition header. |
static void |
percentEscape(StringBuilder buf,
String value)
Does a simple %-escaping of the UTF-8 bytes of the value.
|
public static void percentEscape(StringBuilder buf, String value)
buf
- the buffer to which escaped chars are appendedvalue
- the value to escapepublic static String encodeContentDisposition(String filename, boolean inline, String userAgent)
Content-Disposition
header. For some user agents the full RFC-2231 encoding won't be performed
as they don't understand it.filename
- the filenameinline
- true
for an inline disposition, false
for an attachmentuserAgent
- the userAgentContent-Disposition
headerCopyright © 2015 Nuxeo SA. All rights reserved.