org.apache.ant.compress.util

## Class LZ4StreamFactory

- java.lang.Object
- - org.apache.ant.compress.util.LZ4StreamFactory

- All Implemented Interfaces:
    CompressorStreamFactory, CompressorWithConcatenatedStreamsFactory

      public class LZ4StreamFactory
      extends java.lang.Object
      implements CompressorWithConcatenatedStreamsFactory

  Creates streams for LZ4 format.
  Since:
    Apache Compress Antlib 1.5
  See Also:
    LZ4 Project

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LZ4StreamFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.commons.compress.compressors.CompressorInputStream` | `getCompressorStream(java.io.InputStream stream)`
    `org.apache.commons.compress.compressors.CompressorInputStream` | `getCompressorStream(java.io.InputStream stream, boolean decompressConcatenated)`
    `org.apache.commons.compress.compressors.CompressorOutputStream` | `getCompressorStream(java.io.OutputStream stream)`
    `protected boolean` | `isFramed()` Whether to use the "frame format".
    `void` | `setFramed(boolean framed)` Whether to use the "frame format".

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LZ4StreamFactory

          public LZ4StreamFactory()

  - ### Method Detail

    - #### setFramed

          public void setFramed(boolean framed)

      Whether to use the "frame format".

      Defaults to true.

    - #### isFramed

          protected boolean isFramed()

      Whether to use the "frame format".

    - #### getCompressorStream

          public org.apache.commons.compress.compressors.CompressorInputStream getCompressorStream(java.io.InputStream stream)
                                                                                            throws java.io.IOException

      Specified by:
        `getCompressorStream` in interface `CompressorStreamFactory`
      Parameters:
        `stream` - the stream to read from, should be buffered
      Throws:
        `java.io.IOException`

    - #### getCompressorStream

          public org.apache.commons.compress.compressors.CompressorInputStream getCompressorStream(java.io.InputStream stream,
                                                                                                   boolean decompressConcatenated)
                                                                                            throws java.io.IOException

      Specified by:
        `getCompressorStream` in interface `CompressorWithConcatenatedStreamsFactory`
      Parameters:
        `stream` - the stream to read from, should be buffered
        `decompressConcatenated` - if true, decompress until the end of the input; if false, stop after the first stream
      Throws:
        `java.io.IOException`

    - #### getCompressorStream

          public org.apache.commons.compress.compressors.CompressorOutputStream getCompressorStream(java.io.OutputStream stream)
                                                                                             throws java.io.IOException

      Specified by:
        `getCompressorStream` in interface `CompressorStreamFactory`
      Parameters:
        `stream` - the stream to write to, should be buffered
      Throws:
        `java.io.IOException`