Interface DSCEvent

    • Method Detail

      • getEventType

        int getEventType()
        Returns the event type.
        Returns:
        the event type (see DSCParserConstants)
      • asDSCComment

        DSCComment asDSCComment()
        Casts this instance to a DSCComment if possible.
        Returns:
        this event as a DSCComment
        Throws:
        java.lang.ClassCastException - if the event is no DSCComment
      • asLine

        PostScriptLine asLine()
        Casts this instance to a PostScriptLine if possible.
        Returns:
        this event as a PostScriptLine
        Throws:
        java.lang.ClassCastException - if the event is no PostScriptLine
      • isDSCComment

        boolean isDSCComment()
        Indicates whether the instance is a DSC comment.
        Returns:
        true if the instance is a DSC comment
      • isComment

        boolean isComment()
        Indicates whether the instance is a PostScript comment.
        Returns:
        true if the instance is a PostScript comment
      • isHeaderComment

        boolean isHeaderComment()
        Indicates whether the instance is a header comment.
        Returns:
        true if the instance is a header comment
      • isLine

        boolean isLine()
        Indicates whether the instance is a PostScript line.
        Returns:
        true if the instance is a PostScript line
      • generate

        void generate​(PSGenerator gen)
               throws java.io.IOException
        Writes the event to the given PSGenerator.
        Parameters:
        gen - the PSGenerator to write to
        Throws:
        java.io.IOException - In case of an I/O error