1 18 package org.apache.batik.svggen.font.table; 19 20 import java.io.IOException ; 21 import java.io.RandomAccessFile ; 22 23 27 public class DirectoryEntry { 28 29 private int tag; 30 private int checksum; 31 private int offset; 32 private int length; 33 private Table table = null; 34 35 protected DirectoryEntry(RandomAccessFile raf) throws IOException { 36 tag = raf.readInt(); 37 checksum = raf.readInt(); 38 offset = raf.readInt(); 39 length = raf.readInt(); 40 } 41 42 public int getChecksum() { 43 return checksum; 44 } 45 46 public int getLength() { 47 return length; 48 } 49 50 public int getOffset() { 51 return offset; 52 } 53 54 public int getTag() { 55 return tag; 56 } 57 58 public String toString() { 59 return new StringBuffer () 60 .append((char)((tag>>24)&0xff)) 61 .append((char)((tag>>16)&0xff)) 62 .append((char)((tag>>8)&0xff)) 63 .append((char)((tag)&0xff)) 64 .append(", offset: ") 65 .append(offset) 66 .append(", length: ") 67 .append(length) 68 .append(", checksum: 0x") 69 .append(Integer.toHexString(checksum)) 70 .toString(); 71 } 72 } 73 | Popular Tags |