Class ZipIteratorPipe

All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasSender, HasTransactionAttribute, IConfigurable, IForwardTarget, IPipe, IScopeProvider, IWithParameters, NameAware, EventThrowing, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

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 - in case it was not able to configure the component.
    • getZipInputStream

      protected ZipInputStream getZipInputStream(Message input) 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
    • getContentsSessionKey

      public String getContentsSessionKey()
    • isStreamingContents

      public boolean isStreamingContents()
    • isCloseInputstreamOnExit

      public boolean isCloseInputstreamOnExit()
    • getCharset

      public String getCharset()
    • isProcessFile

      public boolean isProcessFile()