https://github.com/shred/commons-pdb
Read PalmOS PDB files with Java
https://github.com/shred/commons-pdb
java library palmos pdb-files
Last synced: 4 months ago
JSON representation
Read PalmOS PDB files with Java
- Host: GitHub
- URL: https://github.com/shred/commons-pdb
- Owner: shred
- License: lgpl-3.0
- Created: 2017-11-16T18:31:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-26T17:14:00.000Z (almost 7 years ago)
- Last Synced: 2024-12-25T19:49:52.388Z (about 1 year ago)
- Topics: java, library, palmos, pdb-files
- Language: Java
- Size: 36.1 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-LGPL.txt
Awesome Lists containing this project
README
# commons-pdb  
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](http://search.maven.org/#search|ga|1|a%3A%22commons-pdb%22)
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`.
```java
try (PdbFile pdb = new PdbFile(new File("calendar.pdb")) {
PdbDatabase database = pdb.readDatabase(new ScheduleConverter());
System.out.printf("Name: %s\n", database.getName());
List 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](https://shredzone.org/maven/commons-pdb/) for API details.
There is also a [pdbconverter tool](http://pdbconverter.shredzone.org/) offering a GUI and a command line, for converting PDB files.
## Contribute
* Fork the [Source code at Codeberg](https://codeberg.org/shred/commons-pdb). Feel free to send pull requests.
* Found a bug? [File a bug report](https://codeberg.org/shred/commons-pdb/issues).
## License
_commons-pdb_ is open source software. The source code is distributed under the terms of [GNU Lesser General Public License Version 3](http://www.gnu.org/licenses/lgpl-3.0.html).