com.drew.imaging.jpeg

Class JpegSegmentData

Implemented Interfaces:
Serializable

public class JpegSegmentData
extends java.lang.Object
implements 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.

Constructor Summary

JpegSegmentData()

Method Summary

static JpegSegmentData
FromFile(File file)
static void
ToFile(File file, JpegSegmentData segmentData)
void
addSegment(byte segmentMarker, byte[] segmentBytes)
boolean
containsSegment(byte segmentMarker)
byte[]
getSegment(byte segmentMarker)
byte[]
getSegment(byte segmentMarker, int occurrence)
int
getSegmentCount(byte segmentMarker)
void
removeSegment(byte segmentMarker)
void
removeSegmentOccurrence(byte segmentMarker, int occurrence)

Constructor Details

JpegSegmentData

public JpegSegmentData()

Method Details

FromFile

public static JpegSegmentData FromFile(File file)
            throws IOException,
                   ClassNotFoundException

ToFile

public static void ToFile(File file,
                          JpegSegmentData segmentData)
            throws IOException

addSegment

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

containsSegment

public boolean containsSegment(byte segmentMarker)

getSegment

public byte[] getSegment(byte segmentMarker)

getSegment

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

getSegmentCount

public int getSegmentCount(byte segmentMarker)

removeSegment

public void removeSegment(byte segmentMarker)

removeSegmentOccurrence

public void removeSegmentOccurrence(byte segmentMarker,
                                    int occurrence)

Copyright © 2006 Drew Noakes. All Rights Reserved.