Class PFMInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.fop.fonts.type1.PFMInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

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.
  • Constructor Details

    • PFMInputStream

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

    • readByte

      public short readByte() throws IOException
      Parses a one byte value out of the stream.
      Returns:
      The value extracted
      Throws:
      IOException - In case of an I/O problem
    • readShort

      public int readShort() throws IOException
      Parses a two byte value out of the stream.
      Returns:
      The value extracted
      Throws:
      IOException - In case of an I/O problem
    • readInt

      public long readInt() throws IOException
      Parses a four byte value out of the stream.
      Returns:
      The value extracted
      Throws:
      IOException - In case of an I/O problem
    • readString

      public String readString() throws IOException
      Parses a zero-terminated string out of the stream.
      Returns:
      The value extracted
      Throws:
      IOException - In case of an I/O problem