org.biojava.bio.seq.db
Interface Index

All Known Implementing Classes:
SimpleIndex

public interface Index

This defines an index entry for an individual sequence within a set of indexed files.

Author:
Matthew Pocock

Method Summary
 File getFile()
          The file to retrieve from.
 String getID()
          The ID of the sequence at this position in this file.
 int getLength()
          The entry can be slurped out of the file by grabbing length bytes from start.
 long getStart()
          Skipping this number of bytes through the file should put the file pointer to the first byte of the sequence.
 

Method Detail

getFile

File getFile()
The file to retrieve from.

Returns:
the File containing this Sequence

getStart

long getStart()
Skipping this number of bytes through the file should put the file pointer to the first byte of the sequence.

Returns:
the offset within the file

getLength

int getLength()
The entry can be slurped out of the file by grabbing length bytes from start. If the length can't be read from a store then this method should return -1.

Returns:
the length in bytes of this indexed entry

getID

String getID()
The ID of the sequence at this position in this file.

Returns:
the ID of the indexed Sequence