com.drew.imaging.jpeg
Class JpegSegmentData

java.lang.Object
  extended by com.drew.imaging.jpeg.JpegSegmentData
All Implemented Interfaces:
java.io.Serializable

public class JpegSegmentData
extends java.lang.Object
implements java.io.Serializable

Holds a collection of Jpeg data segments. This need not necessarily be all segments within the Jpeg. For example, it may be convenient to port about only the non-image segments when analysing (or serializing) metadata.

See Also:
Serialized Form

Constructor Summary
JpegSegmentData()
           
 
Method Summary
 void addSegment(byte segmentMarker, byte[] segmentBytes)
           
 boolean containsSegment(byte segmentMarker)
           
static JpegSegmentData FromFile(java.io.File file)
           
 byte[] getSegment(byte segmentMarker)
           
 byte[] getSegment(byte segmentMarker, int occurrence)
           
 int getSegmentCount(byte segmentMarker)
           
 void removeSegment(byte segmentMarker)
           
 void removeSegmentOccurrence(byte segmentMarker, int occurrence)
           
static void ToFile(java.io.File file, JpegSegmentData segmentData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpegSegmentData

public JpegSegmentData()
Method Detail

addSegment

public void addSegment(byte segmentMarker,
                       byte[] segmentBytes)

getSegment

public byte[] getSegment(byte segmentMarker)

getSegment

public byte[] getSegment(byte segmentMarker,
                         int occurrence)

getSegmentCount

public int getSegmentCount(byte segmentMarker)

removeSegmentOccurrence

public void removeSegmentOccurrence(byte segmentMarker,
                                    int occurrence)

removeSegment

public void removeSegment(byte segmentMarker)

containsSegment

public boolean containsSegment(byte segmentMarker)

ToFile

public static void ToFile(java.io.File file,
                          JpegSegmentData segmentData)
                   throws java.io.IOException
Throws:
java.io.IOException

FromFile

public static JpegSegmentData FromFile(java.io.File file)
                                throws java.io.IOException,
                                       java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException


Copyright © 2006 Drew Noakes. All Rights Reserved.