public abstract static class PayloadImpl.Part extends Object implements org.glassfish.api.admin.Payload.Part
| Modifier and Type | Method and Description |
|---|---|
void |
copy(OutputStream os) |
String |
getContentType() |
File |
getExtracted() |
protected InputStream |
getExtractedInputStream() |
String |
getName() |
Properties |
getProperties() |
boolean |
isRecursive() |
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.
|
public String getName()
getName in interface org.glassfish.api.admin.Payload.Partpublic String getContentType()
getContentType in interface org.glassfish.api.admin.Payload.Partpublic Properties getProperties()
getProperties in interface org.glassfish.api.admin.Payload.Partpublic boolean isRecursive()
isRecursive in interface org.glassfish.api.admin.Payload.Partpublic void setExtracted(File extractedFile)
setExtracted in interface org.glassfish.api.admin.Payload.Partpublic File getExtracted()
getExtracted in interface org.glassfish.api.admin.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
copy in interface org.glassfish.api.admin.Payload.PartIOExceptionCopyright © 2017–2020 Eclipse Foundation. All rights reserved.