FileDocCategorySizeDatePackage
DRIMarkerSegment.javaAPI DocJava SE 5 API1869Fri Aug 26 14:54:42 BST 2005com.sun.imageio.plugins.jpeg

DRIMarkerSegment

public class DRIMarkerSegment extends MarkerSegment
A DRI (Define Restart Interval) marker segment.

Fields Summary
int
restartInterval
Restart interval, or 0 if none is specified.
Constructors Summary
DRIMarkerSegment(JPEGBuffer buffer)


     
          
        super(buffer);
        restartInterval = (buffer.buf[buffer.bufPtr++] & 0xff) << 8;
        restartInterval |= buffer.buf[buffer.bufPtr++] & 0xff;
        buffer.bufAvail -= length;
    
DRIMarkerSegment(Node node)

        super(JPEG.DRI);
        updateFromNativeNode(node, true);
    
Methods Summary
javax.imageio.metadata.IIOMetadataNodegetNativeNode()

        IIOMetadataNode node = new IIOMetadataNode("dri");
        node.setAttribute("interval", Integer.toString(restartInterval));
        return node;
    
voidprint()

        printTag("DRI");
        System.out.println("Interval: " 
                           + Integer.toString(restartInterval));
    
voidupdateFromNativeNode(org.w3c.dom.Node node, boolean fromScratch)

        restartInterval = getAttributeValue(node, null, "interval", 
                                            0, 65535, true);
    
voidwrite(javax.imageio.stream.ImageOutputStream ios)
Writes the data for this segment to the stream in valid JPEG format.

        // We don't write DRI segments; the IJG library does.