public class PfbParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static int |
ASCII_MARKER
the ascii marker.
|
private static int |
BINARY_MARKER
the binary marker.
|
private static int |
BUFFER_SIZE
buffersize.
|
private int[] |
lengths
the lengths of the records.
|
private static int |
PFB_HEADER_LENGTH
the pdf header length.
|
private static int[] |
PFB_RECORDS
The record types in the pfb-file.
|
private byte[] |
pfbdata
the parsed pfb-data.
|
private static int |
START_MARKER
the start marker.
|
Constructor and Description |
---|
PfbParser(byte[] bytes)
Create a new object.
|
PfbParser(java.io.InputStream in)
Create a new object.
|
PfbParser(java.lang.String filename)
Create a new object.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getInputStream()
Returns the pfb data as stream.
|
int[] |
getLengths()
Returns the lengths.
|
byte[] |
getPfbdata()
Returns the pfbdata.
|
byte[] |
getSegment1()
Returns the first segment
|
byte[] |
getSegment2()
Returns the second segment
|
private void |
parsePfb(byte[] pfb)
Parse the pfb-array.
|
private byte[] |
readPfbInput(java.io.InputStream in)
Read the pdf input.
|
int |
size()
Returns the size of the pfb-data.
|
private static final int PFB_HEADER_LENGTH
private static final int START_MARKER
private static final int ASCII_MARKER
private static final int BINARY_MARKER
private static final int[] PFB_RECORDS
private static final int BUFFER_SIZE
private byte[] pfbdata
private int[] lengths
public PfbParser(java.lang.String filename) throws java.io.IOException
filename
- the file namejava.io.IOException
- if an IO-error occurs.public PfbParser(java.io.InputStream in) throws java.io.IOException
in
- The input.java.io.IOException
- if an IO-error occurs.public PfbParser(byte[] bytes) throws java.io.IOException
bytes
- The input.java.io.IOException
- if an IO-error occurs.private void parsePfb(byte[] pfb) throws java.io.IOException
pfb
- The pfb-Arrayjava.io.IOException
- in an IO-error occurs.private byte[] readPfbInput(java.io.InputStream in) throws java.io.IOException
in
- The input.java.io.IOException
- if an IO-error occurs.public int[] getLengths()
public byte[] getPfbdata()
public java.io.InputStream getInputStream()
public int size()
public byte[] getSegment1()
public byte[] getSegment2()