Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq.db.emblcd
Class EntryNamRandomAccess

    java.lang.Object
      org.biojava.bio.seq.db.emblcd.EmblCDROMRandomAccess
          org.biojava.bio.seq.db.emblcd.EntryNamRandomAccess

    public class EntryNamRandomAccess

extends EmblCDROMRandomAccess

`EntryNamRandomAccess` objects provide random access to records within the "entrynam.idx" file of an EMBL CD-ROM format binary index. Records are retrieved by their sequence ID.

Since:
  1.2
Author:
  Keith James

Field Summary

Fields inherited from class org.biojava.bio.seq.db.emblcd.EmblCDROMRandomAccess
`raIndexFile, recBytes, recParser`

Constructor Summary
`EntryNamRandomAccess(File indexFile, int headerLength, int recordLength, long recordCount)`

Method Summary
`protected String` | `getRecordKey(Object[] record)` `getRecordKey` returns the field from the record on which the records were sorted in the index.
`protected Object[]` | `readRecord()` `readRecord` creates an array of Objects from the raw byte array of a single record.

Methods inherited from class org.biojava.bio.seq.db.emblcd.EmblCDROMRandomAccess
`close, findRecord, getFile`

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

Constructor Detail

### EntryNamRandomAccess

    public EntryNamRandomAccess(File indexFile,
                                int headerLength,
                                int recordLength,
                                long recordCount)
                         throws FileNotFoundException

Throws:
  `FileNotFoundException`

Method Detail

### readRecord

    protected Object[] readRecord()
                           throws IOException

  `readRecord` creates an array of Objects from the raw byte array of a single record. For this file type the array contains `String seqID, Long rPosition, Long sPosition, Integer fileNumber`. See EMBOSS documentation for a full description.

  Specified by:
    `readRecord` in class `EmblCDROMRandomAccess`
  Returns:
    an `Object []` array.
  Throws:
    `IOException` - if an error occurs.

### getRecordKey

    protected String getRecordKey(Object[] record)

  `getRecordKey` returns the field from the record on which the records were sorted in the index. (i.e. sequence ID or accession number).

  Specified by:
    `getRecordKey` in class `EmblCDROMRandomAccess`
  Returns:
    a `String`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD