org.extex.font.format.dvi.command
Class DviCommand

java.lang.Object
  extended by org.extex.font.format.dvi.command.DviCommand
Direct Known Subclasses:
DviBOP, DviChar, DviDown, DviEOP, DviFntDef, DviFntNum, DviNOP, DviPOP, DviPost, DviPostPost, DviPre, DviPush, DviRight, DviRule, DviW, DviX, DviXXX, DviY, DviZ

public abstract class DviCommand
extends java.lang.Object

Abstract class for all DVI commands.

Version:
$Revision: 6099 $
Author:
Michael Niedermair

Field Summary
static int BOP_LENGTH
          The length of c elements of the bob command.
 
Constructor Summary
protected DviCommand(int opcode, int sp)
          Create a new object.
 
Method Summary
static java.util.List<DviFntDef> getFntDefs(RandomAccessR rar)
          Read the fnt_def commands.
abstract  java.lang.String getName()
          Returns the name of the command.
static DviCommand getNextCommand(RandomAccessR rar)
          Reads the next dvi command.
 int getOpcode()
          Returns the opcode of the command.
static DviPost getPost(RandomAccessR rar)
          Reads the DviPost command.
static DviPre getPre(RandomAccessR rar)
          Reads the DviPre command.
 int getStartPointer()
          Returns the start pointer of the command.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BOP_LENGTH

public static final int BOP_LENGTH
The length of c elements of the bob command.

See Also:
Constant Field Values
Constructor Detail

DviCommand

protected DviCommand(int opcode,
                     int sp)
Create a new object.

Parameters:
opcode - the opcode
sp - the start pointer
Method Detail

getNextCommand

public static DviCommand getNextCommand(RandomAccessR rar)
                                 throws java.io.IOException,
                                        FontException,
                                        ConfigurationException
Reads the next dvi command.

Parameters:
rar - the input
Returns:
Returns the next command
Throws:
java.io.IOException - if an IO-error occurs.
FontException - if a font-error occurs.
ConfigurationException

getPost

public static DviPost getPost(RandomAccessR rar)
                       throws java.io.IOException,
                              FontException,
                              ConfigurationException
Reads the DviPost command.

Parameters:
rar - the input
Returns:
Returns the DviPost command
Throws:
java.io.IOException - if an IO-error occurs.
FontException - if a font-error occurs.
ConfigurationException

getPre

public static DviPre getPre(RandomAccessR rar)
                     throws java.io.IOException,
                            FontException,
                            ConfigurationException
Reads the DviPre command.

Parameters:
rar - the input
Returns:
Returns the DviPre command
Throws:
java.io.IOException - if an IO-error occurs.
FontException - if a font-error occurs.
ConfigurationException

getFntDefs

public static java.util.List<DviFntDef> getFntDefs(RandomAccessR rar)
                                            throws java.io.IOException,
                                                   FontException
Read the fnt_def commands.

The post commands must read before!

Parameters:
rar - the input
Returns:
Returns the fnt_def commands.
Throws:
java.io.IOException - if an IO-error occurs.
FontException - if a font-error occurs.

getOpcode

public int getOpcode()
Returns the opcode of the command.

Returns:
Returns the opcode of the command.

getStartPointer

public int getStartPointer()
Returns the start pointer of the command.

Returns:
Returns the start pointer of the command.

getName

public abstract java.lang.String getName()
Returns the name of the command.

Returns:
Returns the name of the command.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object