Class StreamedResourceGroup
- All Implemented Interfaces:
Completable, Streamable
A print-file resource group
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final OutputStreamthe outputstream to write toprivate booleanFields inherited from class AbstractNamedAFPObject
nameFields inherited from class AbstractTripletStructuredObject
tripletsFields inherited from class AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObject(AbstractNamedAFPObject namedObject) Adds a resource to the external resource groupvoidclose()Closes this external resource group fileReturns the outputstreambooleanReturns true if this object is completevoidsetComplete(boolean complete) Sets whether or not this object is complete or notMethods inherited from class ResourceGroup
getResourceCount, toString, writeContent, writeEnd, writeStartMethods inherited from class AbstractNamedAFPObject
copySF, getName, getNameBytes, getNameLength, setNameMethods inherited from class AbstractTripletStructuredObject
addTriplet, addTriplets, getFullyQualifiedName, getTripletDataLength, getTriplets, hasTriplet, hasTriplets, setComment, setFullyQualifiedName, setFullyQualifiedName, setObjectClassification, writeTripletsMethods inherited from class AbstractStructuredObject
writeToStreamMethods inherited from class AbstractAFPObject
copySF, truncate, writeChunksToStream, writeObjects
-
Field Details
-
os
the outputstream to write to -
started
private boolean started -
complete
private boolean complete
-
-
Constructor Details
-
StreamedResourceGroup
Main constructor- Parameters:
name- the resource group nameos- the outputstream
-
-
Method Details
-
addObject
Adds a resource to the external resource group- Overrides:
addObjectin classResourceGroup- Parameters:
namedObject- a named object- Throws:
IOException- thrown if an I/O exception of some sort has occurred.
-
close
Closes this external resource group file- Throws:
IOException- thrown if an I/O exception of some sort has occurred.
-
getOutputStream
-
setComplete
public void setComplete(boolean complete) Sets whether or not this object is complete or not- Specified by:
setCompletein interfaceCompletable- Parameters:
complete- true if this object is complete
-
isComplete
public boolean isComplete()Returns true if this object is complete- Specified by:
isCompletein interfaceCompletable- Returns:
- true if this object is complete
-