org.apache.cassandra.hints

## Class CompressedHintsWriter

- java.lang.Object
- - org.apache.cassandra.hints.CompressedHintsWriter

All Implemented Interfaces:
  java.lang.AutoCloseable

    public class CompressedHintsWriter
    extends java.lang.Object

### Field Summary

Fields
`protected java.nio.channels.FileChannel` `channel`
`protected java.util.zip.CRC32` `globalCRC`

### Constructor Summary

Constructors
Constructor and Description
`CompressedHintsWriter(java.io.File directory, org.apache.cassandra.hints.HintsDescriptor descriptor, java.io.File file, java.nio.channels.FileChannel channel, int fd, java.util.zip.CRC32 globalCRC)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()`
`void` `fsync()`
`protected void` `writeBuffer(java.nio.ByteBuffer bb)` Writes byte buffer into the file channel.

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

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

### Field Detail

#### channel

    protected final java.nio.channels.FileChannel channel

#### globalCRC

    protected final java.util.zip.CRC32 globalCRC

### Constructor Detail

#### CompressedHintsWriter

    public CompressedHintsWriter(java.io.File directory,
                                 org.apache.cassandra.hints.HintsDescriptor descriptor,
                                 java.io.File file,
                                 java.nio.channels.FileChannel channel,
                                 int fd,
                                 java.util.zip.CRC32 globalCRC)

### Method Detail

#### writeBuffer

    protected void writeBuffer(java.nio.ByteBuffer bb)
                        throws java.io.IOException

Writes byte buffer into the file channel. Buffer should be flipped before calling this

Throws:
  `java.io.IOException`

#### close

    public void close()

Specified by:
  `close` in interface `java.lang.AutoCloseable`

#### fsync

    public void fsync()