public class TodoConverter extends Object implements Converter<TodoRecord,CategoryAppInfo>
Converter
that handles todo records.Constructor and Description |
---|
TodoConverter() |
Modifier and Type | Method and Description |
---|---|
TodoRecord |
convert(PdbFile reader,
int record,
int size,
int attribute,
PdbDatabase<TodoRecord,CategoryAppInfo> database)
Converts raw record data to a
Record object. |
CategoryAppInfo |
convertAppInfo(PdbFile reader,
int size,
PdbDatabase<TodoRecord,CategoryAppInfo> database)
Converts raw application info data to an
AppInfo . |
boolean |
isAcceptable(PdbDatabase<TodoRecord,CategoryAppInfo> database)
Checks if this record converter is able to convert records for the PdbDatabase.
|
public TodoConverter()
public boolean isAcceptable(PdbDatabase<TodoRecord,CategoryAppInfo> database)
Converter
isAcceptable
in interface Converter<TodoRecord,CategoryAppInfo>
database
- The PdbDatabase
that is currently generated. Note that the
database is still being read. The basic attributes are already read and
may be used, but the appinfo and records are still incomplete. You would
usually access the database to read the database name or creator.true
if the converter is able to process the database records.public TodoRecord convert(PdbFile reader, int record, int size, int attribute, PdbDatabase<TodoRecord,CategoryAppInfo> database) throws IOException
Converter
Record
object.convert
in interface Converter<TodoRecord,CategoryAppInfo>
reader
- PdbFile
with the file cursor at the beginning of the recordrecord
- Record number that is currently readsize
- Size of this record, in bytesattribute
- Attributes of this record (unsigned byte)database
- The PdbDatabase
that is currently generated. Note that the
database is still being read. The attributes and appinfo are already
read and may be used, but the records are still incomplete. You would
usually access the database to read the database name or the category
map.Record
object containing the data of this record, or null
if the raw data did not result in a record (e.g. because it was deleted).IOException
public CategoryAppInfo convertAppInfo(PdbFile reader, int size, PdbDatabase<TodoRecord,CategoryAppInfo> database) throws IOException
Converter
AppInfo
.convertAppInfo
in interface Converter<TodoRecord,CategoryAppInfo>
reader
- PdbFile
with the file cursor at the beginning of the appinfo
areasize
- Estimated size of the appinfo area, in bytes. Note that the actual
appinfo area might be smaller.database
- The PdbDatabase
that is currently generated. Note that the
database is still being read. The simple attributes are already read
and may be used, but the appinfo and records are still empty. Usually
you would like to ignore this parameter if possible.AppInfo
object containing the converted appinfoIOException
Copyright © 2009–2016. All rights reserved.