org.apache.fop.fonts
Class FontFileReader

java.lang.Object
  |
  +--org.apache.fop.fonts.FontFileReader

public class FontFileReader
extends java.lang.Object

Reads a file into an array and provides file like functions for array access.


Constructor Summary
FontFileReader(java.lang.String fileName)
          Constructor
 
Method Summary
 int getCurrentPos()
          return current file position
 int getFileSize()
           
 byte read()
          Read 1 byte, throws EOFException on end of file
 byte readTTFByte()
          Read 1 signed byte from InputStream
 int readTTFLong()
          Read 4 bytes from InputStream
 short readTTFShort()
          Read 2 bytes signed from InputStream
 java.lang.String readTTFString()
          Read a 0 terminatet ISO-8859-1 string
 java.lang.String readTTFString(int len)
          Read an ISO-8859-1 string of len bytes
 int readTTFUByte()
          Read 1 unsigned byte from InputStream
 long readTTFULong()
          Read 4 bytes from InputStream
 int readTTFUShort()
          Read 2 bytes unsigned from InputStream
 void seek_add(long add)
          Set current file position to offset
 void seek_set(long offset)
          Set current file position to offset
 void skip(long add)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontFileReader

public FontFileReader(java.lang.String fileName)
               throws java.io.IOException
Constructor
Parameters:
fileName - filename to read
Method Detail

seek_set

public void seek_set(long offset)
              throws java.io.IOException
Set current file position to offset

seek_add

public void seek_add(long add)
              throws java.io.IOException
Set current file position to offset

skip

public void skip(long add)
          throws java.io.IOException

getCurrentPos

public int getCurrentPos()
return current file position

getFileSize

public int getFileSize()

read

public byte read()
          throws java.io.IOException
Read 1 byte, throws EOFException on end of file

readTTFByte

public final byte readTTFByte()
                       throws java.io.IOException
Read 1 signed byte from InputStream

readTTFUByte

public final int readTTFUByte()
                       throws java.io.IOException
Read 1 unsigned byte from InputStream

readTTFShort

public final short readTTFShort()
                         throws java.io.IOException
Read 2 bytes signed from InputStream

readTTFUShort

public final int readTTFUShort()
                        throws java.io.IOException
Read 2 bytes unsigned from InputStream

readTTFLong

public final int readTTFLong()
                      throws java.io.IOException
Read 4 bytes from InputStream

readTTFULong

public final long readTTFULong()
                        throws java.io.IOException
Read 4 bytes from InputStream

readTTFString

public final java.lang.String readTTFString()
                                     throws java.io.IOException
Read a 0 terminatet ISO-8859-1 string

readTTFString

public final java.lang.String readTTFString(int len)
                                     throws java.io.IOException
Read an ISO-8859-1 string of len bytes


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.