Class EpsReader

java.lang.Object
com.drew.metadata.eps.EpsReader

public class EpsReader extends Object
Reads file passed in through SequentialReader and parses encountered data:
  • Basic EPS Comments
  • EXIF
  • Photoshop
  • IPTC
  • ICC Profile
  • XMP
EPS comments are retrieved from EPS directory. Photoshop, ICC Profile, and XMP processing is passed to their respective reader.

EPS Constraints (Source: https://www-cdf.fnal.gov/offline/PostScript/5001.PDF pg.18):

  • Max line length is 255 characters
  • Lines end with a CR(0xD) or LF(0xA) character (or both, in practice)
  • ':' separates keywords (considered part of the keyword)
  • Whitespace is either a space(0x20) or tab(0x9)
  • If there is more than one header, the 1st is truth
Author:
Payton Garland
  • Constructor Details

    • EpsReader

      public EpsReader()
  • Method Details

    • extract

      public void extract(InputStream inputStream, Metadata metadata) throws IOException
      Filter method that determines if file will contain an EPS Header. If it does, it will read the necessary data and then set the position to the beginning of the PostScript data. If it does not, the position will not be changed. After both scenarios, the main extract method is called.
      Parameters:
      inputStream - InputStream containing file
      metadata - Metadata to add directory to and extracted data
      Throws:
      IOException