source: josm/trunk/src/com/drew/imaging/tiff/TiffHandler.java@ 8132

Last change on this file since 8132 was 8132, checked in by Don-vip, 10 years ago

fix #11162 - update to metadata-extractor 2.7.2

File size: 3.1 KB
Line 
1/*
2 * Copyright 2002-2015 Drew Noakes
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * More information about this project is available at:
17 *
18 * https://drewnoakes.com/code/exif/
19 * https://github.com/drewnoakes/metadata-extractor
20 */
21package com.drew.imaging.tiff;
22
23import com.drew.lang.RandomAccessReader;
24import com.drew.lang.Rational;
25import com.drew.lang.annotations.NotNull;
26
27import java.io.IOException;
28import java.util.Set;
29
30/**
31 * @author Drew Noakes https://drewnoakes.com
32 */
33public interface TiffHandler
34{
35 /**
36 * Receives the 2-byte marker found in the TIFF header.
37 * <p>
38 * Implementations are not obligated to use this information for any purpose, though it may be useful for
39 * validation or perhaps differentiating the type of mapping to use for observed tags and IFDs.
40 *
41 * @param marker the 2-byte value found at position 2 of the TIFF header
42 */
43 void setTiffMarker(int marker) throws TiffProcessingException;
44
45 boolean isTagIfdPointer(int tagType);
46 boolean hasFollowerIfd();
47
48 void endingIFD();
49
50 void completed(@NotNull final RandomAccessReader reader, final int tiffHeaderOffset);
51
52 boolean customProcessTag(int tagOffset,
53 @NotNull Set<Integer> processedIfdOffsets,
54 int tiffHeaderOffset,
55 @NotNull RandomAccessReader reader,
56 int tagId,
57 int byteCount) throws IOException;
58
59 void warn(@NotNull String message);
60 void error(@NotNull String message);
61
62 void setByteArray(int tagId, @NotNull byte[] bytes);
63 void setString(int tagId, @NotNull String string);
64 void setRational(int tagId, @NotNull Rational rational);
65 void setRationalArray(int tagId, @NotNull Rational[] array);
66 void setFloat(int tagId, float float32);
67 void setFloatArray(int tagId, @NotNull float[] array);
68 void setDouble(int tagId, double double64);
69 void setDoubleArray(int tagId, @NotNull double[] array);
70 void setInt8s(int tagId, byte int8s);
71 void setInt8sArray(int tagId, @NotNull byte[] array);
72 void setInt8u(int tagId, short int8u);
73 void setInt8uArray(int tagId, @NotNull short[] array);
74 void setInt16s(int tagId, int int16s);
75 void setInt16sArray(int tagId, @NotNull short[] array);
76 void setInt16u(int tagId, int int16u);
77 void setInt16uArray(int tagId, @NotNull int[] array);
78 void setInt32s(int tagId, int int32s);
79 void setInt32sArray(int tagId, @NotNull int[] array);
80 void setInt32u(int tagId, long int32u);
81 void setInt32uArray(int tagId, @NotNull long[] array);
82}
Note: See TracBrowser for help on using the repository browser.