public interface DocumentPart
Modifier and Type | Method and Description |
---|---|
void |
addCustomDirective(java.lang.String name,
java.lang.String value)
Add a custom directive
|
java.lang.String |
getComputedMime()
This is only available after MIME detection: TODO: maybe only in
AnalysisDocumentPart ??
|
java.nio.ByteBuffer |
getContentAsByteBuffer()
Create a new java.nio ByteBuffer containing the part's data
|
byte[] |
getContentAsBytes()
Get the part content as bytes.
|
java.io.InputStream |
getContentAsInputStream()
Get the part content as an input stream.
|
long |
getContentLength()
Get the part content length, in bytes.
|
java.util.List<? extends Directive> |
getCustomDirectives()
Get the list of custom directives
|
java.lang.String |
getEncoding()
Get the encoding
|
java.lang.String |
getEncodingHint()
Get the encoding hint (encoding which may be the actual encoding)
|
java.lang.String |
getFilename()
Get the filename hint of the document part.
If it can be known, it's always better to specify a filename, as it helps some processing elements understand the type of the part. |
java.lang.String |
getForcedMime()
Get the forced MIME type (MIME type known to be valid, or enforced)
|
java.lang.String |
getMimeHint()
Get the MIME hint (MIME which may be the valid MIME)
|
java.lang.String |
getName()
Get the name of this part.
|
void |
setContent(byte[] bytes)
Set the content of this part, as a Java array
|
void |
setContent(java.nio.ByteBuffer buffer)
Set the content of this part, as a Java NIO ByteBuffer
|
void |
setContent(java.io.InputStream stream,
long streamSize)
Set the content of this part, as a Java InputStream
|
void |
setEncoding(java.lang.String encoding)
Set the encoding
|
void |
setEncodingHint(java.lang.String mimeHint)
Set the encoding hint (encoding which may be the actual encoding)
|
void |
setFilename(java.lang.String filename) |
void |
setForcedMime(java.lang.String forcedMime)
Set the forced MIME type (MIME type known to be valid, or enforced)
|
void |
setMimeHint(java.lang.String mimeHint)
Set the MIME hint (MIME which may be the valid MIME)
|
void |
setName(java.lang.String name) |
java.lang.String getName()
void setName(java.lang.String name)
getName
java.lang.String getFilename()
void setFilename(java.lang.String filename)
getFilename
java.lang.String getEncoding()
void setEncoding(java.lang.String encoding)
encoding
- the encodingjava.lang.String getForcedMime()
void setForcedMime(java.lang.String forcedMime)
forcedMime
- the forced MIME typejava.lang.String getMimeHint()
void setMimeHint(java.lang.String mimeHint)
mimeHint
- the MIME hintjava.lang.String getEncodingHint()
void setEncodingHint(java.lang.String mimeHint)
mimeHint
- the encoding hintjava.util.List<? extends Directive> getCustomDirectives()
void addCustomDirective(java.lang.String name, java.lang.String value)
name
- The custom directive namevalue
- The custom directive valuejava.lang.String getComputedMime()
void setContent(byte[] bytes)
void setContent(java.nio.ByteBuffer buffer)
void setContent(java.io.InputStream stream, long streamSize)
java.io.InputStream getContentAsInputStream()
long getContentLength()
byte[] getContentAsBytes()
java.nio.ByteBuffer getContentAsByteBuffer()
Copyright © 2013 Dassault Systèmes, All Rights Reserved.