Class DSCHeaderComment
java.lang.Object
org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
org.apache.xmlgraphics.ps.dsc.events.DSCHeaderComment
- All Implemented Interfaces:
DSCParserConstants,DSCEvent
Represents a DSC header comment (beginning with "%!).
-
Field Summary
FieldsFields inherited from interface org.apache.xmlgraphics.ps.dsc.DSCParserConstants
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(PSGenerator gen) Writes the event to the given PSGenerator.Returns the comment.intReturns the event type.booleanIndicates whether the instance is a header comment.booleanIndicates whether the file started by this comments is DSC 3.0 compliant.Methods inherited from class org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
asDSCComment, asLine, isComment, isDSCComment, isLine
-
Field Details
-
comment
-
-
Constructor Details
-
DSCHeaderComment
Creates a new instance.- Parameters:
comment- the comment
-
-
Method Details
-
getComment
Returns the comment.- Returns:
- the comment
-
isPSAdobe30
public boolean isPSAdobe30()Indicates whether the file started by this comments is DSC 3.0 compliant.- Returns:
- true if the file is DSC 3.0 compliant.
-
generate
Description copied from interface:DSCEventWrites the event to the given PSGenerator.- Parameters:
gen- the PSGenerator to write to- Throws:
IOException- In case of an I/O error- See Also:
-
getEventType
public int getEventType()Description copied from interface:DSCEventReturns the event type.- Returns:
- the event type (see
DSCParserConstants) - See Also:
-
isHeaderComment
public boolean isHeaderComment()Description copied from interface:DSCEventIndicates whether the instance is a header comment.- Specified by:
isHeaderCommentin interfaceDSCEvent- Overrides:
isHeaderCommentin classAbstractEvent- Returns:
- true if the instance is a header comment
- See Also:
-