org.apache.fontbox.pfb

## Class PfbParser

- java.lang.Object
- - org.apache.fontbox.pfb.PfbParser

    public class PfbParser
    extends Object

Parser for a pfb-file.

Author:
  Ben Litchfield, Michael Niedermair

### Constructor Summary

Constructors
Constructor and Description
`PfbParser(byte[] bytes)` Create a new object.
`PfbParser(InputStream in)` Create a new object.
`PfbParser(String filename)` Create a new object.

### Method Summary

All Methods Instance Methods Concrete Methods
`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
`int` `size()` Returns the size of the pfb-data.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PfbParser

    public PfbParser(String filename)
              throws IOException

Create a new object.

Parameters:
  `filename` - the file name
Throws:
  `IOException` - if an IO-error occurs.

#### PfbParser

    public PfbParser(InputStream in)
              throws IOException

Create a new object.

Parameters:
  `in` - The input.
Throws:
  `IOException` - if an IO-error occurs.

#### PfbParser

    public PfbParser(byte[] bytes)
              throws IOException

Create a new object.

Parameters:
  `bytes` - The input.
Throws:
  `IOException` - if an IO-error occurs.

### Method Detail

#### getLengths

    public int[] getLengths()

Returns the lengths.

Returns:
  Returns the lengths.

#### getPfbdata

    public byte[] getPfbdata()

Returns the pfbdata.

Returns:
  Returns the pfbdata.

#### getInputStream

    public InputStream getInputStream()

Returns the pfb data as stream.

Returns:
  Returns the pfb data as stream.

#### size

    public int size()

Returns the size of the pfb-data.

Returns:
  Returns the size of the pfb-data.

#### getSegment1

    public byte[] getSegment1()

Returns the first segment

Returns:
  first segment bytes

#### getSegment2

    public byte[] getSegment2()

Returns the second segment

Returns:
  second segment bytes