Package org.apache.fop.afp.goca
Class GraphicsChainedSegment
- java.lang.Object
-
- All Implemented Interfaces:
Completable
,Startable
,Streamable
,StructuredData
public final class GraphicsChainedSegment extends AbstractGraphicsDrawingOrderContainer
A GOCA graphics segment
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type
-
-
Field Summary
Fields Modifier and Type Field Description private static byte
APPEND_NEW_SEGMENT
private static byte
APPEND_TO_EXISING
private boolean
appended
static int
MAX_DATA_LEN
The maximum segment data lengthprivate static int
NAME_LENGTH
private byte[]
predecessorNameBytes
private static byte
PROLOG
private boolean
prologPresent
-
Fields inherited from class org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer
objects
-
Fields inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
name
-
Fields inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
triplets
-
Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description GraphicsChainedSegment(java.lang.String name)
Main constructorGraphicsChainedSegment(java.lang.String name, byte[] predecessorNameBytes, boolean appended, boolean prologPresent)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDataLength()
Returns the current data lengthprotected int
getNameLength()
Returns the name length(package private) byte
getOrderCode()
java.lang.String
toString()
void
writeToStream(java.io.OutputStream os)
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream-
Methods inherited from class org.apache.fop.afp.goca.AbstractGraphicsDrawingOrderContainer
addAll, addObject, isComplete, isStarted, removeLast, setComplete, setStarted, writeContent, writeStart
-
Methods inherited from class org.apache.fop.afp.modca.AbstractNamedAFPObject
copySF, getName, getNameBytes, setName
-
Methods inherited from class org.apache.fop.afp.modca.AbstractTripletStructuredObject
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTriplets
-
Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject
writeEnd
-
Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
-
-
-
Field Detail
-
MAX_DATA_LEN
public static final int MAX_DATA_LEN
The maximum segment data length- See Also:
- Constant Field Values
-
predecessorNameBytes
private byte[] predecessorNameBytes
-
appended
private boolean appended
-
prologPresent
private boolean prologPresent
-
APPEND_NEW_SEGMENT
private static final byte APPEND_NEW_SEGMENT
- See Also:
- Constant Field Values
-
APPEND_TO_EXISING
private static final byte APPEND_TO_EXISING
- See Also:
- Constant Field Values
-
PROLOG
private static final byte PROLOG
- See Also:
- Constant Field Values
-
NAME_LENGTH
private static final int NAME_LENGTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GraphicsChainedSegment
public GraphicsChainedSegment(java.lang.String name)
Main constructor- Parameters:
name
- the name of this graphics segment
-
GraphicsChainedSegment
public GraphicsChainedSegment(java.lang.String name, byte[] predecessorNameBytes, boolean appended, boolean prologPresent)
Constructor- Parameters:
name
- the name of this graphics segmentpredecessorNameBytes
- the name of the predecessor in this chainappended
- true if this segment is appended to the previous oneprologPresent
- true if this segment starts with a prolog
-
-
Method Detail
-
getDataLength
public int getDataLength()
Returns the current data length- Specified by:
getDataLength
in interfaceStructuredData
- Overrides:
getDataLength
in classAbstractGraphicsDrawingOrderContainer
- Returns:
- the current data length of this container including all enclosed objects (and their containers)
-
getNameLength
protected int getNameLength()
Returns the name length- Overrides:
getNameLength
in classAbstractNamedAFPObject
- Returns:
- the name length
-
getOrderCode
byte getOrderCode()
-
writeToStream
public void writeToStream(java.io.OutputStream os) throws java.io.IOException
DataStream objects must implement the writeToStream() method to write its data to the given OutputStream- Specified by:
writeToStream
in interfaceStreamable
- Overrides:
writeToStream
in classAbstractStructuredObject
- Parameters:
os
- the outputsteam stream- Throws:
java.io.IOException
- an I/O exception of some sort has occurred.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractNamedAFPObject
-
-