Class ExifTiffHandler

    • Constructor Detail

      • ExifTiffHandler

        public ExifTiffHandler​(Metadata metadata,
                               Directory parentDirectory)
    • Method Detail

      • setTiffMarker

        public void setTiffMarker​(int marker)
                           throws TiffProcessingException
        Description copied from interface: TiffHandler
        Receives the 2-byte marker found in the TIFF header.

        Implementations are not obligated to use this information for any purpose, though it may be useful for validation or perhaps differentiating the type of mapping to use for observed tags and IFDs.

        Parameters:
        marker - the 2-byte value found at position 2 of the TIFF header
        Throws:
        TiffProcessingException
      • tryEnterSubIfd

        public boolean tryEnterSubIfd​(int tagId)
      • hasFollowerIfd

        public boolean hasFollowerIfd()
      • tryCustomProcessFormat

        public java.lang.Long tryCustomProcessFormat​(int tagId,
                                                     int formatCode,
                                                     long componentCount)
      • customProcessTag

        public boolean customProcessTag​(int tagOffset,
                                        java.util.Set<java.lang.Integer> processedIfdOffsets,
                                        int tiffHeaderOffset,
                                        RandomAccessReader reader,
                                        int tagId,
                                        int byteCount)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • processBinary

        private static void processBinary​(Directory directory,
                                          int tagValueOffset,
                                          RandomAccessReader reader,
                                          int byteCount,
                                          java.lang.Boolean isSigned,
                                          int arrayLength)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getReaderString

        private static java.lang.String getReaderString​(RandomAccessReader reader,
                                                        int makernoteOffset,
                                                        int bytesRequested)
                                                 throws java.io.IOException
        Read a given number of bytes from the stream This method is employed to "suppress" attempts to read beyond end of the file as may happen at the beginning of processMakernote when we read increasingly longer camera makes. Instead of failing altogether in this context we return an empty string which will fail all sensible attempts to compare to makes while avoiding a full-on failure.
        Throws:
        java.io.IOException
      • processMakernote

        private boolean processMakernote​(int makernoteOffset,
                                         java.util.Set<java.lang.Integer> processedIfdOffsets,
                                         int tiffHeaderOffset,
                                         RandomAccessReader reader)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • handlePrintIM

        private static boolean handlePrintIM​(Directory directory,
                                             int tagId)
      • processPrintIM

        private static void processPrintIM​(PrintIMDirectory directory,
                                           int tagValueOffset,
                                           RandomAccessReader reader,
                                           int byteCount)
                                    throws java.io.IOException
        Process PrintIM IFD Converted from Exiftool version 10.33 created by Phil Harvey http://www.sno.phy.queensu.ca/~phil/exiftool/ lib\Image\ExifTool\PrintIM.pm
        Throws:
        java.io.IOException