Skip to content

shred/commons-pdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commons-pdb build status maven central

A Java library for reading PalmOS PDB database files.

Features

  • Lightweight, only requires Java 1.7 or higher, no other dependencies.
  • Android compatible, requires API level 19 (KitKat) or higher.
  • Available at Maven Central

This library offers converters for reading the contents of the most common PDB files:

  • Address book
  • Datebook
  • Todo-List
  • Memo
  • Notepad (except on Android)

Custom converters can be added for other PDB files. Also, all PDB file contents can be read as raw byte arrays.

Example

This example reads a calendar PDB file, and converts the records to ScheduleRecord objects using a ScheduleConverter.

try (PdbFile pdb = new PdbFile(new File("calendar.pdb")) {
    PdbDatabase<ScheduleRecord, CategoryAppInfo> database = pdb.readDatabase(new ScheduleConverter());

    System.out.printf("Name: %s\n", database.getName());

    List<Category> cats = database.getAppInfo().getCategories();
    for (int ix = 0; ix < cats.size(); ix++) {
        System.out.printf("Category %d: %s\n", ix, cats.get(ix));
    }

    for (ScheduleRecord entry : database.getRecords()) {
        System.out.println(entry);
    }
}

See the online documentation for API details.

There is also a pdbconverter tool offering a GUI and a command line, for converting PDB files.

Contribute

License

commons-pdb is open source software. The source code is distributed under the terms of GNU Lesser General Public License Version 3.