aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fonts/TTFDirTabEntry.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/fonts/TTFDirTabEntry.java')
-rw-r--r--src/org/apache/fop/fonts/TTFDirTabEntry.java69
1 files changed, 50 insertions, 19 deletions
diff --git a/src/org/apache/fop/fonts/TTFDirTabEntry.java b/src/org/apache/fop/fonts/TTFDirTabEntry.java
index 1c1e7406c..6648832a7 100644
--- a/src/org/apache/fop/fonts/TTFDirTabEntry.java
+++ b/src/org/apache/fop/fonts/TTFDirTabEntry.java
@@ -1,22 +1,20 @@
/*
* $Id$
- * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
+ * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
package org.apache.fop.fonts;
-import java.io.*;
-class TTFDirTabEntry {
- byte[] tag;
- int checksum;
- long offset;
- long length;
+import java.io.IOException;
- TTFDirTabEntry() {
- tag = new byte[4];
- }
+class TTFDirTabEntry {
+
+ private byte[] tag = new byte[4];
+ private int checksum;
+ private long offset;
+ private long length;
/**
* Read Dir Tab, return tag name
@@ -32,16 +30,49 @@ class TTFDirTabEntry {
offset = in.readTTFULong();
length = in.readTTFULong();
- /*
- * System.out.println ("Read dir tab [" + tag[0]+
- * " "+tag[1] +
- * " "+tag[2] +
- * " "+tag[3] +
- * "] offset: " + offset +
- * " length: " + length +
- * " name: " + new String(tag));
- */
+ //System.out.println(this.toString());
return new String(tag, "ISO-8859-1");
}
+
+
+ public String toString() {
+ return "Read dir tab ["
+ + tag[0] + " " + tag[1] + " " + tag[2] + " " + tag[3] + "]"
+ + " offset: " + offset
+ + " length: " + length
+ + " name: " + tag;
+ }
+
+ /**
+ * Returns the checksum.
+ * @return int
+ */
+ public int getChecksum() {
+ return checksum;
+ }
+
+ /**
+ * Returns the length.
+ * @return long
+ */
+ public long getLength() {
+ return length;
+ }
+
+ /**
+ * Returns the offset.
+ * @return long
+ */
+ public long getOffset() {
+ return offset;
+ }
+
+ /**
+ * Returns the tag.
+ * @return byte[]
+ */
+ public byte[] getTag() {
+ return tag;
+ }
}