Package org.apache.fop.afp.parser
Class UnparsedStructuredField
java.lang.Object
org.apache.fop.afp.parser.UnparsedStructuredField
Represents an unparsed (generic) AFP structured field.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final byte[]
private final UnparsedStructuredField.Introducer
-
Constructor Summary
ConstructorsConstructorDescriptionUnparsedStructuredField
(UnparsedStructuredField.Introducer introducer, byte[] data, byte[] extData) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
Returns category code function name for this field.byte[]
Returns the complete structured field as a byte array.byte[]
getData()
Returns the structured field's payload.(package private) byte[]
Returns the extension data if present.short
Returns the length of the extension if present.(package private) byte[]
byte
Returns the structured field's category code.byte
Returns the structured field's class code.short
Returns the structured field's length.byte
Returns the structured field's type code.int
Returns the structured field's identifier.private String
Returns type code function name for this field.boolean
Indicates whether an field introducer extension is present.boolean
Indicates whether the data is padded.boolean
Indicates whether segmented data is present.toString()
void
writeTo
(OutputStream out) Writes this structured field to the givenOutputStream
.
-
Field Details
-
introducer
-
extData
private final byte[] extData -
data
private final byte[] data
-
-
Constructor Details
-
UnparsedStructuredField
UnparsedStructuredField(UnparsedStructuredField.Introducer introducer, byte[] data, byte[] extData) - Parameters:
data
- Structured field dataextData
- Structured field extension dataStructured
- field introducer
-
-
Method Details
-
toString
-
getTypeCodeAsString
Returns type code function name for this field.- Returns:
- the type code function name
-
getCategoryCodeAsString
Returns category code function name for this field.- Returns:
- the category code function name
-
getSfLength
public short getSfLength()Returns the structured field's length.- Returns:
- the field length
-
getSfTypeID
public int getSfTypeID()Returns the structured field's identifier.- Returns:
- the field identifier
-
getSfClassCode
public byte getSfClassCode()Returns the structured field's class code.- Returns:
- the field class code
-
getSfTypeCode
public byte getSfTypeCode()Returns the structured field's type code.- Returns:
- the type code
-
getSfCategoryCode
public byte getSfCategoryCode()Returns the structured field's category code.- Returns:
- the sfCategoryCode
-
isSfiExtensionPresent
public boolean isSfiExtensionPresent()Indicates whether an field introducer extension is present.- Returns:
- true if an field introducer extension is present
-
isSfiSegmentedData
public boolean isSfiSegmentedData()Indicates whether segmented data is present.- Returns:
- true if the data is segmented
-
isSfiPaddingPresent
public boolean isSfiPaddingPresent()Indicates whether the data is padded.- Returns:
- true if the data is padded
-
getExtLength
public short getExtLength()Returns the length of the extension if present.- Returns:
- the length of the extension (or 0 if no extension is present)
-
getExtData
byte[] getExtData()Returns the extension data if present.- Returns:
- the extension data (or null if no extension is present)
-
getData
public byte[] getData()Returns the structured field's payload.- Returns:
- the field's data
-
getIntroducerData
byte[] getIntroducerData() -
getCompleteFieldAsBytes
public byte[] getCompleteFieldAsBytes()Returns the complete structured field as a byte array.- Returns:
- the complete field data
-
writeTo
Writes this structured field to the givenOutputStream
.- Parameters:
out
- the output stream- Throws:
IOException
- if an I/O error occurs
-