CompressedStreamWriter (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.streaming.compress

## Class CompressedStreamWriter

- java.lang.Object
- - org.apache.cassandra.streaming.StreamWriter
  - - org.apache.cassandra.streaming.compress.CompressedStreamWriter

-     public class CompressedStreamWriter
      extends StreamWriter

  StreamWriter for compressed SSTable.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CHUNK_SIZE`

    - ### Fields inherited from class org.apache.cassandra.streaming.StreamWriter

      `limiter, sections, session, sstable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedStreamWriter(SSTableReader sstable, java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections, CompressionInfo compressionInfo, StreamSession session)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected long` | `totalSize()`
    `void` | `write(java.nio.channels.WritableByteChannel channel)` Stream file of specified sections to given channel.

    - ### Methods inherited from class org.apache.cassandra.streaming.StreamWriter

      `write`

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

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

- - ### Field Detail

    - #### CHUNK_SIZE

          public static final int CHUNK_SIZE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CompressedStreamWriter

          public CompressedStreamWriter(SSTableReader sstable,
                                java.util.Collection<Pair<java.lang.Long,java.lang.Long>> sections,
                                CompressionInfo compressionInfo,
                                StreamSession session)

  - ### Method Detail

    - #### write

          public void write(java.nio.channels.WritableByteChannel channel)
                     throws java.io.IOException

      Description copied from class: `StreamWriter`
      Stream file of specified sections to given channel. StreamWriter uses LZF compression on wire to decrease size to transfer.
      Overrides:
        `write` in class `StreamWriter`
      Parameters:
        `channel` - where this writes data to
      Throws:
        `java.io.IOException` - on any I/O error

    - #### totalSize

          protected long totalSize()

      Overrides:
        `totalSize` in class `StreamWriter`

Copyright © 2014 The Apache Software Foundation