## org.apache.cassandra.db.columniterator
Class SSTableSliceIterator

    java.lang.Object
      org.apache.cassandra.db.columniterator.SSTableSliceIterator

All Implemented Interfaces:
  java.io.Closeable, java.util.Iterator<IColumn>, IColumnIterator, ISSTableColumnIterator, CloseableIterator<IColumn>

    public class SSTableSliceIterator

extends java.lang.Object
implements ISSTableColumnIterator

A Column Iterator over SSTable

Constructor Summary
`SSTableSliceIterator(SSTableReader sstable, DecoratedKey key, java.nio.ByteBuffer startColumn, java.nio.ByteBuffer finishColumn, boolean reversed)`
`SSTableSliceIterator(SSTableReader sstable, FileDataInput file, DecoratedKey key, java.nio.ByteBuffer startColumn, java.nio.ByteBuffer finishColumn, boolean reversed)` An iterator for a slice within an SSTable

Method Summary
`void` `close()` clean up any open resources
`ColumnFamily` `getColumnFamily()`
`DecoratedKey` `getKey()`
`SSTableReader` `getSStable()`
`boolean` `hasNext()`
`IColumn` `next()`
`void` `remove()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SSTableSliceIterator

    public SSTableSliceIterator(SSTableReader sstable,
                                DecoratedKey key,
                                java.nio.ByteBuffer startColumn,
                                java.nio.ByteBuffer finishColumn,
                                boolean reversed)

### SSTableSliceIterator

    public SSTableSliceIterator(SSTableReader sstable,
                                FileDataInput file,
                                DecoratedKey key,
                                java.nio.ByteBuffer startColumn,
                                java.nio.ByteBuffer finishColumn,
                                boolean reversed)

  An iterator for a slice within an SSTable

  Parameters:
    `sstable` - Table for the CFS we are reading from
    `file` - Optional parameter that input is read from. If null is passed, this class creates an appropriate one automatically. If this class creates, it will close the underlying file when #close() is called. If a caller passes a non-null argument, this class will NOT close the underlying file when the iterator is closed (i.e. the caller is responsible for closing the file) In all cases the caller should explicitly #close() this iterator.
    `key` - The key the requested slice resides under
    `startColumn` - The start of the slice
    `finishColumn` - The end of the slice
    `reversed` - Results are returned in reverse order iff reversed is true.

Method Detail

### getSStable

    public SSTableReader getSStable()

  Specified by:
    `getSStable` in interface `ISSTableColumnIterator`

### getKey

    public DecoratedKey getKey()

  Specified by:
    `getKey` in interface `IColumnIterator`
  Returns:
    the current row key

### getColumnFamily

    public ColumnFamily getColumnFamily()

  Specified by:
    `getColumnFamily` in interface `IColumnIterator`
  Returns:
    A ColumnFamily holding metadata for the row being iterated. Do not modify this CF. Whether it is empty or not is implementation-dependent.

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `java.util.Iterator<IColumn>`

### next

    public IColumn next()

  Specified by:
    `next` in interface `java.util.Iterator<IColumn>`

### remove

    public void remove()

  Specified by:
    `remove` in interface `java.util.Iterator<IColumn>`

### close

    public void close()
               throws java.io.IOException

  Description copied from interface: `IColumnIterator`
  clean up any open resources

  Specified by:
    `close` in interface `java.io.Closeable`
  Specified by:
    `close` in interface `IColumnIterator`
  Throws:
    `java.io.IOException`

Copyright © 2013 The Apache Software Foundation