Package org.docx4j.fonts.fop.fonts.type1
Class PFMInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.docx4j.fonts.fop.fonts.type1.PFMInputStream
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class PFMInputStream
extends java.io.FilterInputStream
This is a helper class for reading PFM files. It defines functions for
extracting specific values out of the stream.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors Constructor Description PFMInputStream(java.io.InputStream in)Constructs a PFMInputStream based on an InputStream representing the PFM file. -
Method Summary
Modifier and Type Method Description 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.java.lang.StringreadString()Parses a zero-terminated string out of the stream.Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PFMInputStream
public PFMInputStream(java.io.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 java.io.IOExceptionParses a one byte value out of the stream.- Returns:
- The value extracted
- Throws:
java.io.IOException- In case of an I/O problem
-
readShort
public int readShort() throws java.io.IOExceptionParses a two byte value out of the stream.- Returns:
- The value extracted
- Throws:
java.io.IOException- In case of an I/O problem
-
readInt
public long readInt() throws java.io.IOExceptionParses a four byte value out of the stream.- Returns:
- The value extracted
- Throws:
java.io.IOException- In case of an I/O problem
-
readString
public java.lang.String readString() throws java.io.IOExceptionParses a zero-terminated string out of the stream.- Returns:
- The value extracted
- Throws:
java.io.IOException- In case of an I/O problem
-