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.raIndexFile, recBytes, recParser
Constructor and Description |
---|
EntryNamRandomAccess(File indexFile,
int headerLength,
int recordLength,
long recordCount) |
Modifier and Type | Method and Description |
---|---|
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. |
close, findRecord, getFile
public EntryNamRandomAccess(File indexFile, int headerLength, int recordLength, long recordCount) throws FileNotFoundException
FileNotFoundException
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.readRecord
in class EmblCDROMRandomAccess
Object []
array.IOException
- if an error occurs.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).getRecordKey
in class EmblCDROMRandomAccess
String
.Copyright © 2014 BioJava. All rights reserved.