Package org.glassfish.admin.payload
Class PayloadImpl.Part
- java.lang.Object
-
- org.glassfish.admin.payload.PayloadImpl.Part
-
- All Implemented Interfaces:
org.glassfish.api.admin.Payload.Part
- Enclosing class:
- PayloadImpl
public abstract static class PayloadImpl.Part extends Object implements org.glassfish.api.admin.Payload.Part
Partial implementation of Part.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(OutputStream os)StringgetContentType()FilegetExtracted()protected InputStreamgetExtractedInputStream()StringgetName()PropertiesgetProperties()booleanisRecursive()static PayloadImpl.PartnewInstance(String contentType, String name, Properties props, File file)Creates a new Part from a File.static PayloadImpl.PartnewInstance(String contentType, String name, Properties props, InputStream is)Creates a new Part from an InputStream.static PayloadImpl.PartnewInstance(String contentType, String name, Properties props, String content)Creates a new Part from a String.voidsetExtracted(File extractedFile)Some use cases need reentrantable implementation of this stream implementation.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.glassfish.api.admin.Payload.Part
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceorg.glassfish.api.admin.Payload.Part
-
getProperties
public Properties getProperties()
- Specified by:
getPropertiesin interfaceorg.glassfish.api.admin.Payload.Part
-
isRecursive
public boolean isRecursive()
- Specified by:
isRecursivein interfaceorg.glassfish.api.admin.Payload.Part
-
setExtracted
public void setExtracted(File extractedFile)
Some use cases need reentrantable implementation of this stream implementation. Information about extraction can be used for it.- Specified by:
setExtractedin interfaceorg.glassfish.api.admin.Payload.Part
-
getExtracted
public File getExtracted()
- Specified by:
getExtractedin interfaceorg.glassfish.api.admin.Payload.Part
-
getExtractedInputStream
protected InputStream getExtractedInputStream()
-
newInstance
public static PayloadImpl.Part newInstance(String contentType, String name, Properties props, InputStream is)
Creates a new Part from an InputStream.- Parameters:
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 data- Returns:
- the new Part
-
newInstance
public static PayloadImpl.Part newInstance(String contentType, String name, Properties props, String content)
Creates a new Part from a String.- Parameters:
contentType- content type for the Partname- name of the Partprops- Properties to be associated with the Partcontent- String containing the content for the Part- Returns:
-
newInstance
public static PayloadImpl.Part newInstance(String contentType, String name, Properties props, File file) throws FileNotFoundException
Creates a new Part from a File.- Parameters:
contentType- content type for the Partname- name of the Partprops- Properties to be associated with the Partfile- File containing the content for the Part- Returns:
- Throws:
FileNotFoundException
-
copy
public void copy(OutputStream os) throws IOException
- Specified by:
copyin interfaceorg.glassfish.api.admin.Payload.Part- Throws:
IOException
-
-