131132133134135136137138139140141
// Save entry head out.writeLong(STORAGE_VERSION); // write the entry file version out.writeLong(_minScn); out.writeLong(_maxScn); out.writeInt(size()); // Save entry body saveDataSection(out); // Save entry tail.
6263646566676869707172
raf.setLength(fileLength); DataWriter writer = createDataWriter(file); writer.open(); writer.writeInt(12345); writer.writeInt(54321); writer.writeInt(Integer.MAX_VALUE); writer.writeLong(0L); writer.writeLong(-123L);
6364656667686970717273
DataWriter writer = createDataWriter(file); writer.open(); writer.writeInt(12345); writer.writeInt(54321); writer.writeInt(Integer.MAX_VALUE); writer.writeLong(0L); writer.writeLong(-123L); writer.writeLong(Long.MAX_VALUE);
6465666768697071727374
7374757677787980818283
} DataWriter writer = createDataWriter(file); writer.open(); for(int i = 0, cnt = posList.size(); i < cnt; i++) { writer.writeInt(posList.get(i), valList.get(i)); } writer.flush(); writer.close(); DataReader reader = createDataReader(file);