de.dante.extex.format.dvi.command
Class DviCommand

java.lang.Object
  extended byde.dante.extex.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: 1.2 $
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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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,
                                        DviException,
                                        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.
DviException - if a dvi-erroor occurs.
FontException - if a font-error occurs.
ConfigurationException - from the config system.

getPost

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

Parameters:
rar - the input
Returns:
Returns the DviPost command
Throws:
java.io.IOException - if an IO-error occurs.
DviException - if a dvi-erroor occurs.
FontException - if a font-error occurs.
ConfigurationException - from the config system.

getPre

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

Parameters:
rar - the input
Returns:
Returns the DviPre command
Throws:
java.io.IOException - if an IO-error occurs.
DviException - if a dvi-erroor occurs.
FontException - if a font-error occurs.
ConfigurationException - from the config system.

getFntDefs

public static java.util.List getFntDefs(RandomAccessR rar)
                                 throws java.io.IOException,
                                        DviException,
                                        FontException,
                                        ConfigurationException
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.
DviException - if a dvi-erroor occurs.
FontException - if a font-error occurs.
ConfigurationException - from the config system.

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.