Class GraphicsData

    • Field Detail

      • MAX_DATA_LEN

        public static final int MAX_DATA_LEN
        the maximum graphics data length
        See Also:
        Constant Field Values
    • Constructor Detail

      • GraphicsData

        public GraphicsData()
        Main constructor
    • Method Detail

      • setSegmentedData

        public void setSegmentedData​(boolean segmented)
        Sets the indicator that this instance is a part of a series of segmented data chunks. This indirectly sets the SegFlag on the SFI header.
        Parameters:
        segmented - true if this data object is not the last of the series
      • createSegmentName

        public java.lang.String createSegmentName()
        Returns a new segment name
        Returns:
        a new segment name
      • newSegment

        public GraphicsChainedSegment newSegment()
        Creates a new graphics segment.
        Returns:
        a newly created graphics segment
      • newSegment

        public GraphicsChainedSegment newSegment​(boolean appended,
                                                 boolean prologPresent)
        Creates a new graphics segment.
        Parameters:
        appended - true if this segment is appended to the previous one
        prologPresent - true if started with a prolog
        Returns:
        a newly created graphics segment
      • removeCurrentSegment

        public StructuredData removeCurrentSegment()
        Removes the current segment from this graphics data
        Returns:
        the current segment from this graphics data
      • 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 interface Streamable
        Overrides:
        writeToStream in class AbstractStructuredObject
        Parameters:
        os - the outputsteam stream
        Throws:
        java.io.IOException - an I/O exception of some sort has occurred.
      • addSegment

        public void addSegment​(GraphicsChainedSegment segment)
        Adds the given segment to this graphics data
        Parameters:
        segment - a graphics chained segment