public class ContentDisposition extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ContentDisposition.ContentDispositionBuilder<T extends ContentDisposition.ContentDispositionBuilder,V extends ContentDisposition>
Builder to build content disposition.
|
Modifier | Constructor and Description |
---|---|
|
ContentDisposition(HttpHeaderReader reader,
boolean fileNameFix) |
|
ContentDisposition(String header) |
|
ContentDisposition(String header,
boolean fileNameFix) |
protected |
ContentDisposition(String type,
String fileName,
Date creationDate,
Date modificationDate,
Date readDate,
long size) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDateParameter(StringBuilder sb,
String name,
Date p) |
protected void |
addLongParameter(StringBuilder sb,
String name,
Long p) |
protected void |
addStringParameter(StringBuilder sb,
String name,
String p) |
protected String |
encodeAsciiFileName(String fileName) |
Date |
getCreationDate()
Get the creation-date parameter.
|
String |
getFileName()
Get the filename parameter.
|
String |
getFileName(boolean decodeExtended)
Get the filename parameter.
|
Date |
getModificationDate()
Get the modification-date parameter.
|
Map<String,String> |
getParameters()
Get the parameters.
|
Date |
getReadDate()
Get the read-date parameter.
|
long |
getSize()
Get the size parameter.
|
String |
getType()
Get the type.
|
String |
toString()
Convert the disposition to a "Content-Disposition" header value.
|
protected StringBuilder |
toStringBuffer() |
static ContentDisposition.ContentDispositionBuilder |
type(String type)
Start building content disposition.
|
protected ContentDisposition(String type, String fileName, Date creationDate, Date modificationDate, Date readDate, long size)
public ContentDisposition(String header) throws ParseException
ParseException
public ContentDisposition(String header, boolean fileNameFix) throws ParseException
ParseException
public ContentDisposition(HttpHeaderReader reader, boolean fileNameFix) throws ParseException
ParseException
public String getType()
public String getFileName()
public String getFileName(boolean decodeExtended)
decodeExtended
- decode the filename* to be human-readable when true
public Date getCreationDate()
public Date getModificationDate()
public Date getReadDate()
public long getSize()
public String toString()
protected StringBuilder toStringBuffer()
protected void addStringParameter(StringBuilder sb, String name, String p)
protected void addDateParameter(StringBuilder sb, String name, Date p)
protected void addLongParameter(StringBuilder sb, String name, Long p)
public static ContentDisposition.ContentDispositionBuilder type(String type)
type
- the disposition type.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.