19package org.openoffice.xmerge.converter.palm;
21import java.io.DataInput;
22import java.io.DataOutput;
23import java.io.IOException;
40final class PdbHeader {
43 byte[] pdbName =
null;
54 long creationDate = 0;
57 long modificationDate = 0;
60 private long lastBackupDate = 0;
66 private long modificationNumber = 0;
69 private int appInfoID = 0;
72 private int sortInfoID = 0;
81 private int uniqueIDSeed = 0;
84 private int nextRecordListID = 0;
104 public void read(DataInput in)
throws IOException {
105 pdbName =
new byte[PalmDB.NAME_LENGTH];
106 in.readFully(pdbName);
108 version =
in.readUnsignedShort();
109 creationDate =
in.readInt() & 0xffffffffL;
110 modificationDate =
in.readInt() & 0xffffffffL;
111 lastBackupDate =
in.readInt() & 0xffffffffL;
112 modificationNumber =
in.readInt() & 0xffffffffL;
113 appInfoID =
in.readInt();
114 sortInfoID =
in.readInt();
115 creatorID =
in.readInt();
117 uniqueIDSeed =
in.readInt();
118 nextRecordListID =
in.readInt();
119 numRecords =
in.readUnsignedShort();
129 public void write(DataOutput out)
throws IOException {
131 out.writeShort(attribute);
132 out.writeShort(version);
133 out.writeInt((
int) creationDate);
134 out.writeInt((
int) modificationDate);
135 out.writeInt((
int) lastBackupDate);
136 out.writeInt((
int) modificationNumber);
137 out.writeInt(appInfoID);
138 out.writeInt(sortInfoID);
139 out.writeInt(typeID);
140 out.writeInt(creatorID);
141 out.writeInt(uniqueIDSeed);
142 out.writeInt(nextRecordListID);
143 out.writeShort(numRecords);