1 18 package org.apache.batik.svggen.font.table; 19 20 import java.io.IOException ; 21 import java.io.RandomAccessFile ; 22 23 28 public abstract class ClassDef { 29 30 public abstract int getFormat(); 31 32 protected static ClassDef read(RandomAccessFile raf) throws IOException { 33 ClassDef c = null; 34 int format = raf.readUnsignedShort(); 35 if (format == 1) { 36 c = new ClassDefFormat1(raf); 37 } else if (format == 2) { 38 c = new ClassDefFormat2(raf); 39 } 40 return c; 41 } 42 } 43 | Popular Tags |