org.apache.fop.fonts
Class PFMInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--java.io.FilterInputStream
              |
              +--org.apache.fop.fonts.PFMInputStream

public class PFMInputStream
extends FilterInputStream

This is a helper class for reading PFM files. It defines functions for extracting specific values out of the stream.

Author:
jeremias.maerki@outline.ch

Field Summary
 (package private) DataInputStreaminStream
           

Constructor Summary
PFMInputStream(InputStream in)
          Constructs a PFMInputStream based on an InputStream representing the PFM file.

Method Summary
 shortreadByte()
          Parses a one byte value out of the stream.
 longreadInt()
          Parses a four byte value out of the stream.
 intreadShort()
          Parses a two byte value out of the stream.
 StringreadString()
          Parses a zero-terminated string out of the stream.

Methods inherited from class java.io.FilterInputStream
read, read, read, skip, available, close, mark, reset, markSupported

Methods inherited from class java.lang.Object
getClass, hashCode, equals, toString, notify, notifyAll, wait, wait, wait

Field Detail

inStream

DataInputStream inStream
Constructor Detail

PFMInputStream

public PFMInputStream(InputStream in)
Constructs a PFMInputStream based on an InputStream representing the PFM file.
Parameters:
inStream - The stream from which to read the PFM file.
Method Detail

readByte

public short readByte()
throws java.io.IOException
Parses a one byte value out of the stream.
Returns: The value extracted.

readInt

public long readInt()
throws java.io.IOException
Parses a four byte value out of the stream.
Returns: The value extracted.

readShort

public int readShort()
throws java.io.IOException
Parses a two byte value out of the stream.
Returns: The value extracted.

readString

public String readString()
throws java.io.IOException
Parses a zero-terminated string out of the stream.
Returns: The value extracted.

Association Links

to Class java.io.DataInputStream