org.WeaselReader.PalmIO
Class ZtxtDB.Annotations
java.lang.Object
org.WeaselReader.PalmIO.Bookmarks
org.WeaselReader.PalmIO.ZtxtDB.Annotations
- Enclosing class:
- ZtxtDB
public class ZtxtDB.Annotations
- extends Bookmarks
A collection of annotations. An annotation is essentially a bookmark with
an extra block of text. The annotation index is identical in format to
the bookmark index. In a zTXT database file, the text of each annotation
would occupy the records following the index record. The annotation text
has a maximum size of 4096 bytes.
Field Summary |
private java.lang.String[] |
annotationText
The text of each annotation in a zTXT. |
Constructor Summary |
ZtxtDB.Annotations(int[] offsets,
java.lang.String[] titles,
java.lang.String[] annotationText)
Create a new annotation collection. |
Method Summary |
java.lang.String |
getAnnotationText(int index)
Get the block of text associated with the given annotation. |
java.lang.String[] |
getAnnotationTextArray()
Get the array containing the annotation text blocks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
annotationText
private final java.lang.String[] annotationText
- The text of each annotation in a zTXT.
ZtxtDB.Annotations
public ZtxtDB.Annotations(int[] offsets,
java.lang.String[] titles,
java.lang.String[] annotationText)
- Create a new annotation collection. The annotation collection is
read-only once created.
- Parameters:
offsets
- an int array containing the byte offsets for each
annotation.titles
- a String array containing the titles for each annotation.annotationText
- a String array containing the text for each
annotation.
getAnnotationText
public java.lang.String getAnnotationText(int index)
- Get the block of text associated with the given annotation.
- Parameters:
index
- the index of the annotation for which to get the text.
- Returns:
- the text block for the given annotation.
getAnnotationTextArray
public java.lang.String[] getAnnotationTextArray()
- Get the array containing the annotation text blocks.
- Returns:
- a String array containing the text blocks of all annotations.