Class ZipIteratorPipe

All Implemented Interfaces:
HasSender, HasTransactionAttribute, IConfigurable, IConfigurationAware, IForwardTarget, INamedObject, IPipe, IScopeProvider, IWithParameters, EventThrowing, HasStatistics, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class ZipIteratorPipe extends IteratingPipe<String>
Sends a message to a Sender for each entry of its input, that must be an ZipInputStream. The input of the pipe must be one of:
  • String refering to a filename
  • File
  • InputStream
The message sent each time to the sender is the filename of the entry found in the archive. The contents of the archive is available as a Stream or a String in a session variable.


Since:
4.9.10
Author:
Gerrit van Brakel
  • Constructor Details

    • ZipIteratorPipe

      public ZipIteratorPipe()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from class: FixedForwardPipe
      checks for correct configuration of forward
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface IPipe
      Overrides:
      configure in class IteratingPipe<String>
      Throws:
      ConfigurationException
    • getZipInputStream

      protected ZipInputStream getZipInputStream(Message input, PipeLineSession session, Map<String,Object> threadContext) throws SenderException
      Throws:
      SenderException
    • getIterator

      protected IDataIterator<String> getIterator(Message input, PipeLineSession session, Map<String,Object> threadContext) throws SenderException
      Overrides:
      getIterator in class IteratingPipe<String>
      Throws:
      SenderException
    • setContentsSessionKey

      public void setContentsSessionKey(String string)
      Session key used to store contents of each zip entry
      Default value
      zipdata
    • setStreamingContents

      public void setStreamingContents(boolean b)
      If set to false, a string containing the contents of the entry is placed under the session key, instead of the inputstream to the contents
      Default value
      true
    • setCloseInputstreamOnExit

      public void setCloseInputstreamOnExit(boolean b)
      If set to false, the inputstream is not closed after it has been used
      Default value
      true
    • setCharset

      public void setCharset(String string)
      Charset used when reading the contents of the entry (only used if streamingContents=false)
      Default value
      utf-8
    • setProcessFile

      @Deprecated(forRemoval=true, since="7.8.0") @ConfigurationWarning("Please add a LocalFileSystemPipe with action=read in front of this pipe instead") public void setProcessFile(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      If set true, each entry is assumed to be the name of a file to be compressed. Otherwise, the input itself is compressed.
      Default value
      false
    • getContentsSessionKey

      public String getContentsSessionKey()
    • isStreamingContents

      public boolean isStreamingContents()
    • isCloseInputstreamOnExit

      public boolean isCloseInputstreamOnExit()
    • getCharset

      public String getCharset()
    • isProcessFile

      public boolean isProcessFile()