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 Details

    • getName

      public String getName()
      Specified by:
      getName in interface org.glassfish.api.admin.Payload.Part
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface org.glassfish.api.admin.Payload.Part
    • getProperties

      public Properties getProperties()
      Specified by:
      getProperties in interface org.glassfish.api.admin.Payload.Part
    • isRecursive

      public boolean isRecursive()
      Specified by:
      isRecursive in interface org.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:
      setExtracted in interface org.glassfish.api.admin.Payload.Part
    • getExtracted

      public File getExtracted()
      Specified by:
      getExtracted in interface org.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 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 org.glassfish.api.admin.Payload.Part
      Throws:
      IOException