1 package com.hughes.android.dictionary.engine;
3 import java.io.IOException;
4 import java.io.PrintStream;
5 import java.io.RandomAccessFile;
7 import com.hughes.util.raf.RAFSerializable;
8 import com.hughes.util.raf.RAFSerializer;
10 public class TextEntry extends Entry implements RAFSerializable<TextEntry> {
14 public TextEntry(final RandomAccessFile raf) throws IOException {
18 public void write(RandomAccessFile raf) throws IOException {
22 static final RAFSerializer<TextEntry> SERIALIZER = new RAFSerializer<TextEntry>() {
24 public TextEntry read(RandomAccessFile raf) throws IOException {
25 return new TextEntry(raf);
29 public void write(RandomAccessFile raf, TextEntry t) throws IOException {
35 public static class Row extends RowBase {
37 Row(final RandomAccessFile raf, final int thisRowIndex,
38 final Index index) throws IOException {
39 super(raf, thisRowIndex, index);
42 public TextEntry getEntry() {
43 return index.dict.textEntries.get(referenceIndex);
47 public void print(PrintStream out) {
48 out.println(" " + getEntry().text);