org.glassfish.admin.payload
Class PayloadImpl.Part

java.lang.Object
  extended by org.glassfish.admin.payload.PayloadImpl.Part
All Implemented Interfaces:
Payload.Part
Enclosing class:
PayloadImpl

public abstract static class PayloadImpl.Part
extends Object
implements Payload.Part

Partial implementation of Part.


Method Summary
 void copy(OutputStream os)
           
 String getContentType()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.glassfish.api.admin.Payload.Part
getInputStream
 

Method Detail

getName

public String getName()
Specified by:
getName in interface Payload.Part

getContentType

public String getContentType()
Specified by:
getContentType in interface Payload.Part

getProperties

public Properties getProperties()
Specified by:
getProperties in interface Payload.Part

isRecursive

public boolean isRecursive()
Specified by:
isRecursive in interface Payload.Part

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 Part
name - name of the Part
props - Properties to be associated with the Part
is - 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 Part
name - name of the Part
props - Properties to be associated with the Part
content - 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 Part
name - name of the Part
props - Properties to be associated with the Part
file - File containing the content for the Part
Returns:
Throws:
FileNotFoundException

copy

public void copy(OutputStream os)
          throws IOException
Specified by:
copy in interface Payload.Part
Throws:
IOException


Copyright © 2012 GlassFish Community. All Rights Reserved.