FreeHEP API
Version current

org.freehep.graphicsio.font.truetype
Class TTFInput

java.lang.Object
  extended byorg.freehep.graphicsio.font.truetype.TTFInput
Direct Known Subclasses:
TTFFileInput, TTFMemoryInput

public abstract class TTFInput
extends Object

Data input for true type files. All methods are named as the data formats in the true type specification.

Version:
$Id: TTFInput.java,v 1.1 2001/11/29 01:45:29 duns Exp $
Author:
Simon Fischer
Source Code:
TTFInput.java

Constructor Summary
TTFInput()
           
 
Method Summary
 void checkShortZero()
           
static boolean checkZeroBit(int b, int bit, String name)
           
 boolean flagBit(int bit)
           
static boolean flagBit(int b, int bit)
           
 void popPos()
           
 void pushPos()
           
abstract  int readByte()
           
 void readByteFlags()
          Reads byte flags into a temporary variable which can be queried using the flagBit method.
abstract  byte readChar()
           
 double readF2Dot14()
           
 int[] readFFFFTerminatedUShortArray()
           
 double readFixed()
           
abstract  void readFully(byte[] b)
           
 short readFWord()
           
abstract  int readLong()
           
abstract  int readRawByte()
           
abstract  short readShort()
           
 short[] readShortArray(int n)
           
 int readUFWord()
           
abstract  long readULong()
           
abstract  int readUShort()
           
 int[] readUShortArray(int n)
           
 void readUShortFlags()
          Reads unsigned short flags into a temporary variable which can be queried using the flagBit method.
abstract  void seek(long offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TTFInput

public TTFInput()
Method Detail

seek

public abstract void seek(long offset)
                   throws IOException
Throws:
IOException

pushPos

public void pushPos()
             throws IOException
Throws:
IOException

popPos

public void popPos()
            throws IOException
Throws:
IOException

readRawByte

public abstract int readRawByte()
                         throws IOException
Throws:
IOException

readByte

public abstract int readByte()
                      throws IOException
Throws:
IOException

readShort

public abstract short readShort()
                         throws IOException
Throws:
IOException

readUShort

public abstract int readUShort()
                        throws IOException
Throws:
IOException

readULong

public abstract long readULong()
                        throws IOException
Throws:
IOException

readLong

public abstract int readLong()
                      throws IOException
Throws:
IOException

readChar

public abstract byte readChar()
                       throws IOException
Throws:
IOException

readFWord

public final short readFWord()
                      throws IOException
Throws:
IOException

readUFWord

public final int readUFWord()
                     throws IOException
Throws:
IOException

readFixed

public final double readFixed()
                       throws IOException
Throws:
IOException

readF2Dot14

public final double readF2Dot14()
                         throws IOException
Throws:
IOException

checkShortZero

public final void checkShortZero()
                          throws IOException
Throws:
IOException

checkZeroBit

public static final boolean checkZeroBit(int b,
                                         int bit,
                                         String name)
                                  throws IOException
Throws:
IOException

readUShortFlags

public void readUShortFlags()
                     throws IOException
Reads unsigned short flags into a temporary variable which can be queried using the flagBit method.

Throws:
IOException

readByteFlags

public void readByteFlags()
                   throws IOException
Reads byte flags into a temporary variable which can be queried using the flagBit method.

Throws:
IOException

flagBit

public boolean flagBit(int bit)

flagBit

public static boolean flagBit(int b,
                              int bit)

readFully

public abstract void readFully(byte[] b)
                        throws IOException
Throws:
IOException

readFFFFTerminatedUShortArray

public int[] readFFFFTerminatedUShortArray()
                                    throws IOException
Throws:
IOException

readUShortArray

public int[] readUShortArray(int n)
                      throws IOException
Throws:
IOException

readShortArray

public short[] readShortArray(int n)
                       throws IOException
Throws:
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.