public abstract class AbstractFilePart extends PartBase
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CONTENT_TYPE
Default content encoding of file attachments.
|
static String |
DEFAULT_TRANSFER_ENCODING
Default transfer encoding of file attachments.
|
CHARSET_BYTES, CONTENT_DISPOSITION_BYTES, CONTENT_ID_BYTES, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE_BYTES, CRLF_BYTES, EXTRA_BYTES, FORM_DATA_DISPOSITION_TYPE_BYTES, NAME_BYTES, QUOTE_BYTE| Constructor and Description |
|---|
AbstractFilePart(String name,
String contentType,
Charset charset,
String contentId,
String transferEncoding)
FilePart Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
generateFileEnd() |
protected byte[] |
generateFileStart(byte[] boundary) |
String |
getFileName() |
long |
getStalledTime() |
void |
setFileName(String fileName) |
void |
setStalledTime(long ms) |
String |
toString() |
protected void |
visitDispositionHeader(PartVisitor visitor) |
getCharset, getContentId, getContentType, getDataLength, getDispositionType, getName, getTransferEncoding, length, sendData, setDispositionType, visitContentIdHeader, visitContentTypeHeader, visitEnd, visitEndOfHeader, visitStart, visitTransferEncodingHeader, writepublic static final String DEFAULT_CONTENT_TYPE
public static final String DEFAULT_TRANSFER_ENCODING
public AbstractFilePart(String name, String contentType, Charset charset, String contentId, String transferEncoding)
name - the name for this partpartSource - the source for this partcontentType - the content type for this part, if null the default is usedcharset - the charset encoding for this partprotected void visitDispositionHeader(PartVisitor visitor) throws IOException
visitDispositionHeader in class PartBaseIOExceptionprotected byte[] generateFileStart(byte[] boundary)
throws IOException
IOExceptionprotected byte[] generateFileEnd()
throws IOException
IOExceptionpublic void setStalledTime(long ms)
public long getStalledTime()
public void setFileName(String fileName)
public String getFileName()
Copyright © 2015. All Rights Reserved.