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, wait
getInputStream
public String getName()
Payload.Part
getName
in interface Payload.Part
public String getContentType()
Payload.Part
getContentType
in interface Payload.Part
public Properties getProperties()
Payload.Part
getProperties
in interface Payload.Part
public boolean isRecursive()
Payload.Part
isRecursive
in interface Payload.Part
public void setExtracted(File extractedFile)
setExtracted
in interface Payload.Part
public File getExtracted()
Payload.Part
getExtracted
in interface Payload.Part
protected 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 PartFileNotFoundException
public void copy(OutputStream os) throws IOException
Payload.Part
copy
in interface Payload.Part
os
- target OutputStream to receive the content of the PartIOException
Copyright © 2019. All rights reserved.