de.dante.extex.font.type
Class PlWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended byde.dante.extex.font.type.PlWriter

public class PlWriter
extends java.io.PrintWriter

Writer for the PL-Format.

see TFtoPL

Version:
$Revision: 1.3 $
Author:
Michael Niedermair

Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
PlWriter(java.io.OutputStream out)
          Create a new PlWriter, without automatic line flushing, from an existing OutputStream.
PlWriter(java.io.OutputStream out, boolean autoFlush)
          Create a new PlWriter from an existing OutputStream.
PlWriter(java.io.Writer out, boolean autoFlush)
          Create a new PlWriter.
 
Method Summary
 PlWriter addBool(boolean b)
          Prints a symbolic form of boolean value.
 PlWriter addChar(short c)
          Prints symbolic representation of character code.
 PlWriter addComment(java.lang.String s)
          Add a comment.
 PlWriter addDec(int i)
          Prints D prefix and decimal number.
 PlWriter addFace(int face)
          Prints F prefix and Xerox face code.
 PlWriter addFixWord(TFMFixWord fw, java.lang.String name)
          Add a Fixword.
 PlWriter addOct(int i)
          Prints O prefix and octal number.
 PlWriter addReal(double d)
          Prints R prefix and real number.
 PlWriter addReal(java.lang.Object o)
          Prints R prefix and real number.
 PlWriter addStr(java.lang.String s)
          Prints a character string after one space.
 void close()
          Finishes all posibly unclosed property lists and closes the output.
 void forceNumChars()
          Print always character in numerical (octal) format.
 PlWriter out(char c)
          Write a character.
 PlWriter out(java.lang.String s)
          Write a String.
 PlWriter plclose()
          Decreases nesting level and prints right parenthesis.
 PlWriter plopen(java.lang.String s)
          Increases nesting level and prints left parenthesis folowed by the property name.
 void printZeroWidth(boolean pzw)
          Print a zero fixpointwidth.
 
Methods inherited from class java.io.PrintWriter
checkError, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlWriter

public PlWriter(java.io.Writer out,
                boolean autoFlush)
Create a new PlWriter.

Parameters:
out - A character-output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer

PlWriter

public PlWriter(java.io.OutputStream out)
Create a new PlWriter, without automatic line flushing, from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.

Parameters:
out - An output stream
See Also:
OutputStreamWriter.OutputStreamWriter(java.io.OutputStream)

PlWriter

public PlWriter(java.io.OutputStream out,
                boolean autoFlush)
Create a new PlWriter from an existing OutputStream. This convenience constructor creates the necessary intermediate OutputStreamWriter, which will convert characters into bytes using the default character encoding.

Parameters:
out - An output stream
autoFlush - A boolean; if true, the println() methods will flush the output buffer
See Also:
OutputStreamWriter.OutputStreamWriter(java.io.OutputStream)
Method Detail

out

public PlWriter out(char c)
Write a character.

Parameters:
c - the char
Returns:
Return this, reference for subsequent printing.

out

public PlWriter out(java.lang.String s)
Write a String.

Parameters:
s - the string
Returns:
Return this, reference for subsequent printing.

plopen

public PlWriter plopen(java.lang.String s)
Increases nesting level and prints left parenthesis folowed by the property name.

Parameters:
s - the property name.
Returns:
Return this, reference for subsequent printing.

plclose

public PlWriter plclose()
Decreases nesting level and prints right parenthesis.

Returns:
Return this, reference for subsequent printing.

addDec

public PlWriter addDec(int i)
Prints D prefix and decimal number.

Parameters:
i - the number to be printed.
Returns:
Return this, reference for subsequent printing.

addOct

public PlWriter addOct(int i)
Prints O prefix and octal number.

Parameters:
i - the number to be printed.
Returns:
Return this, reference for subsequent printing.

addReal

public PlWriter addReal(java.lang.Object o)
Prints R prefix and real number.

Parameters:
o - the object which represents the real number.
Returns:
Return this, reference for subsequent printing.

addReal

public PlWriter addReal(double d)
Prints R prefix and real number.

Parameters:
d - the real number.
Returns:
Return this, reference for subsequent printing.

addFace

public PlWriter addFace(int face)
Prints F prefix and Xerox face code. The code is printed in the three character slope/weight/expansion form or in octal if the symbolic form cannot be found.

Parameters:
face - the Xerox face code to be printed.
Returns:
Return this, reference for subsequent printing.

addStr

public PlWriter addStr(java.lang.String s)
Prints a character string after one space.

Parameters:
s - the string to be printed.
Returns:
Return this, reference for subsequent printing.

addBool

public PlWriter addBool(boolean b)
Prints a symbolic form of boolean value.

Parameters:
b - the boolean value to be printed.
Returns:
Return this, reference for subsequent printing.

addChar

public PlWriter addChar(short c)
Prints symbolic representation of character code. If the character code represents printable character and the member octChars is false then it prints C prefix folowed by the character. Otherwise it prints the octal representation (with O prefix).

Parameters:
c - the character code to be printed.
Returns:
Return this, reference for subsequent printing.

forceNumChars

public void forceNumChars()
Print always character in numerical (octal) format.


close

public void close()
Finishes all posibly unclosed property lists and closes the output.


addComment

public PlWriter addComment(java.lang.String s)
Add a comment.

Parameters:
s - the string
Returns:
Return this, reference for subsequent printing.

addFixWord

public PlWriter addFixWord(TFMFixWord fw,
                           java.lang.String name)
Add a Fixword.

Parameters:
fw - the TFmFixWord
name - the name
Returns:
Return this, reference for subsequent printing.

printZeroWidth

public void printZeroWidth(boolean pzw)
Print a zero fixpointwidth.

Parameters:
pzw - print or not