public SSTableNamesIterator(SSTableReader ssTable, String key, SortedSet<byte[]> columnNames) throws IOException
{
assert columnNames != null;
this.columns = columnNames;
DecoratedKey decoratedKey = ssTable.getPartitioner().decorateKey(key);
long position = ssTable.getPosition(decoratedKey);
if (position < 0)
return;
BufferedRandomAccessFile file = new BufferedRandomAccessFile(ssTable.getFilename(), "r", DatabaseDescriptor.getIndexedReadBufferSizeInKB() * 1024);
try
{
file.seek(position);
DecoratedKey keyInDisk = ssTable.getPartitioner().convertFromDiskFormat(file.readUTF());
assert keyInDisk.equals(decoratedKey) : keyInDisk;
file.readInt(); // data size
/* Read the bloom filter summarizing the columns */
BloomFilter bf = IndexHelper.defreezeBloomFilter(file);
List<byte[]> filteredColumnNames = new ArrayList<byte[]>(columnNames.size());