public abstract static class PayloadImpl.Part extends Object implements Payload.Part
| Modifier and Type | Method and Description |
|---|---|
void |
copy(OutputStream os)
Copies the contents of the Part to the specified OutputStream.
|
String |
getContentType()
Returns the content type of the part.
|
File |
getExtracted()
File where content was extracted from the payload.
|
protected InputStream |
getExtractedInputStream() |
String |
getName()
Returns the name assigned to the part when it was created.
|
Properties |
getProperties()
Returns the Properties associated with the Part.
|
boolean |
isRecursive()
Indicates if the Part represents a recursive action or not.
|
static PayloadImpl.Part |
newInstance(String contentType,
String name,
Properties props,
File file)
Creates a new Part from a File.
|
static PayloadImpl.Part |
newInstance(String contentType,
String name,
Properties props,
InputStream is)
Creates a new Part from an InputStream.
|
static PayloadImpl.Part |
newInstance(String contentType,
String name,
Properties props,
String content)
Creates a new Part from a String.
|
void |
setExtracted(File extractedFile)
Some use cases need reentrantable implementation of this stream
implementation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputStreampublic String getName()
Payload.PartgetName in interface Payload.Partpublic String getContentType()
Payload.PartgetContentType in interface Payload.Partpublic Properties getProperties()
Payload.PartgetProperties in interface Payload.Partpublic boolean isRecursive()
Payload.PartisRecursive in interface Payload.Partpublic void setExtracted(File extractedFile)
setExtracted in interface Payload.Partpublic File getExtracted()
Payload.PartgetExtracted in interface Payload.Partprotected InputStream getExtractedInputStream()
public static PayloadImpl.Part newInstance(String contentType, String name, Properties props, InputStream is)
contentType - content type for the Partname - name of the Partprops - Properties to be associated with the Partis - InputStream to be used to populate the Part's datapublic static PayloadImpl.Part newInstance(String contentType, String name, Properties props, String content)
contentType - content type for the Partname - name of the Partprops - Properties to be associated with the Partcontent - String containing the content for the Partpublic static PayloadImpl.Part newInstance(String contentType, String name, Properties props, File file) throws FileNotFoundException
contentType - content type for the Partname - name of the Partprops - Properties to be associated with the Partfile - File containing the content for the PartFileNotFoundExceptionpublic void copy(OutputStream os) throws IOException
Payload.Partcopy in interface Payload.Partos - target OutputStream to receive the content of the PartIOExceptionCopyright © 2019. All rights reserved.