Class PayloadImpl.Part

    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Payload.Part
        Returns the name assigned to the part when it was created.
        Specified by:
        getName in interface Payload.Part
        Returns:
        name
      • getProperties

        public Properties getProperties()
        Description copied from interface: Payload.Part
        Returns the Properties associated with the Part.
        Specified by:
        getProperties in interface Payload.Part
        Returns:
        Properties for the Part
      • isRecursive

        public boolean isRecursive()
        Description copied from interface: Payload.Part
        Indicates if the Part represents a recursive action or not.
        Specified by:
        isRecursive in interface Payload.Part
        Returns:
      • 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 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:
      • copy

        public void copy​(OutputStream os)
                  throws IOException
        Description copied from interface: Payload.Part
        Copies the contents of the Part to the specified OutputStream.
        Specified by:
        copy in interface Payload.Part
        Parameters:
        os - target OutputStream to receive the content of the Part
        Throws:
        IOException