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
Modifier and TypeMethodDescriptionvoidcopy(OutputStream os) protected InputStreamgetName()booleanstatic 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.glassfish.api.admin.Payload.Part
getInputStream
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.glassfish.api.admin.Payload.Part
-
getContentType
- Specified by:
getContentTypein interfaceorg.glassfish.api.admin.Payload.Part
-
getProperties
- Specified by:
getPropertiesin interfaceorg.glassfish.api.admin.Payload.Part
-
isRecursive
public boolean isRecursive()- Specified by:
isRecursivein interfaceorg.glassfish.api.admin.Payload.Part
-
setExtracted
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
- Specified by:
getExtractedin interfaceorg.glassfish.api.admin.Payload.Part
-
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
- Specified by:
copyin interfaceorg.glassfish.api.admin.Payload.Part- Throws:
IOException
-