| Line | |
|---|
| 1 | package com.drew.imaging.jpeg;
|
|---|
| 2 |
|
|---|
| 3 | import com.drew.lang.annotations.NotNull;
|
|---|
| 4 | import com.drew.metadata.Metadata;
|
|---|
| 5 |
|
|---|
| 6 | /**
|
|---|
| 7 | * Defines an object that extracts metadata from in JPEG segments.
|
|---|
| 8 | */
|
|---|
| 9 | public interface JpegSegmentMetadataReader
|
|---|
| 10 | {
|
|---|
| 11 | /**
|
|---|
| 12 | * Gets the set of JPEG segment types that this reader is interested in.
|
|---|
| 13 | */
|
|---|
| 14 | @NotNull
|
|---|
| 15 | public Iterable<JpegSegmentType> getSegmentTypes();
|
|---|
| 16 |
|
|---|
| 17 | /**
|
|---|
| 18 | * Gets a value indicating whether the supplied byte data can be processed by this reader. This is not a guarantee
|
|---|
| 19 | * that no errors will occur, but rather a best-effort indication of whether the parse is likely to succeed.
|
|---|
| 20 | * Implementations are expected to check things such as the opening bytes, data length, etc.
|
|---|
| 21 | */
|
|---|
| 22 | public boolean canProcess(@NotNull final byte[] segmentBytes, @NotNull final JpegSegmentType segmentType);
|
|---|
| 23 |
|
|---|
| 24 | /**
|
|---|
| 25 | * Extracts metadata from a JPEG segment's byte array and merges it into the specified {@link Metadata} object.
|
|---|
| 26 | *
|
|---|
| 27 | * @param segmentBytes The byte array from which the metadata should be extracted.
|
|---|
| 28 | * @param metadata The {@link Metadata} object into which extracted values should be merged.
|
|---|
| 29 | * @param segmentType The {@link JpegSegmentType} being read.
|
|---|
| 30 | */
|
|---|
| 31 | public void extract(@NotNull final byte[] segmentBytes, @NotNull final Metadata metadata, @NotNull final JpegSegmentType segmentType);
|
|---|
| 32 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.