org.apache.cassandra.io
Class SequenceFile.Reader

java.lang.Object
  extended by org.apache.cassandra.io.SequenceFile.AbstractReader
      extended by org.apache.cassandra.io.SequenceFile.Reader
All Implemented Interfaces:
IFileReader
Direct Known Subclasses:
SequenceFile.BufferReader, SequenceFile.ChecksumReader
Enclosing class:
SequenceFile

public static class SequenceFile.Reader
extends SequenceFile.AbstractReader


Field Summary
 
Fields inherited from class org.apache.cassandra.io.SequenceFile.AbstractReader
file_, filename_
 
Method Summary
 void close()
          Close the file after reading.
 long getCurrentPosition()
           
 long getEOF()
           
protected  void init(java.lang.String filename)
           
 boolean isEOF()
           
 boolean isHealthyFileDescriptor()
           
 void readDirect(byte[] bytes)
          Be extremely careful while using this API.
 long readLong()
          Read a long value from the underlying sub system.
 void seek(long position)
           
 
Methods inherited from class org.apache.cassandra.io.SequenceFile.AbstractReader
getFileName, getPositionFromBlockIndex, next, next, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

protected void init(java.lang.String filename)
             throws java.io.IOException
Throws:
java.io.IOException

getEOF

public long getEOF()
            throws java.io.IOException
Throws:
java.io.IOException

getCurrentPosition

public long getCurrentPosition()
                        throws java.io.IOException
Throws:
java.io.IOException

isHealthyFileDescriptor

public boolean isHealthyFileDescriptor()
                                throws java.io.IOException
Throws:
java.io.IOException

seek

public void seek(long position)
          throws java.io.IOException
Throws:
java.io.IOException

isEOF

public boolean isEOF()
              throws java.io.IOException
Throws:
java.io.IOException

readDirect

public void readDirect(byte[] bytes)
                throws java.io.IOException
Be extremely careful while using this API. This currently used to read the commit log header from the commit logs. Treat this as an internal API.

Parameters:
bytes - read from the buffer into the this array
Throws:
java.io.IOException

readLong

public long readLong()
              throws java.io.IOException
Description copied from interface: IFileReader
Read a long value from the underlying sub system.

Returns:
value read
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Description copied from interface: IFileReader
Close the file after reading.

Throws:
java.io.IOException


Copyright © 2009 The Apache Software Foundation