Class MetadataExtractor.TagDescriptor<T extends MetadataExtractor.Directory>

    • Constructor Detail

      • TagDescriptor

        public TagDescriptor​(T directory)
    • Method Detail

      • getDescription

        public java.lang.String getDescription​(int tagType)
        Returns a descriptive value of the specified tag for this image. Where possible, known values will be substituted here in place of the raw tokens actually kept in the metadata segment. If no substitution is available, the value provided by getString(tagType) will be returned.
        Parameters:
        tagType - the tag to find a description for
        Returns:
        a description of the image's value for the specified tag, or null if the tag hasn't been defined.
      • convertBytesToVersionString

        public java.lang.String convertBytesToVersionString​(int[] components,
                                                            int majorDigits)
        Takes a series of 4 bytes from the specified offset, and converts these to a well-known version number, where possible.

        Two different formats are processed:

        • [30 32 31 30] -> 2.10
        • [0 1 0 0] -> 1.00
        Parameters:
        components - the four version values
        majorDigits - the number of components to be
        Returns:
        the version as a string of form "2.10" or null if the argument cannot be converted
      • getVersionBytesDescription

        protected java.lang.String getVersionBytesDescription​(int tagType,
                                                              int majorDigits)
      • getIndexedDescription

        protected java.lang.String getIndexedDescription​(int tagType,
                                                         java.lang.String... descriptions)
      • getIndexedDescription

        protected java.lang.String getIndexedDescription​(int tagType,
                                                         int baseIndex,
                                                         java.lang.String... descriptions)
      • getByteLengthDescription

        protected java.lang.String getByteLengthDescription​(int tagType)
      • getSimpleRational

        protected java.lang.String getSimpleRational​(int tagType)
      • getDecimalRational

        protected java.lang.String getDecimalRational​(int tagType,
                                                      int decimalPlaces)
      • getFormattedInt

        protected java.lang.String getFormattedInt​(int tagType,
                                                   java.lang.String format)
      • getFormattedFloat

        protected java.lang.String getFormattedFloat​(int tagType,
                                                     java.lang.String format)
      • getFormattedString

        protected java.lang.String getFormattedString​(int tagType,
                                                      java.lang.String format)
      • getEpochTimeDescription

        protected java.lang.String getEpochTimeDescription​(int tagType)
      • getBitFlagDescription

        protected java.lang.String getBitFlagDescription​(int tagType,
                                                         java.lang.Object... labels)
        LSB first. Labels may be null, a String, or a String[2] with (low label,high label) values.
      • get7BitStringFromBytes

        protected java.lang.String get7BitStringFromBytes​(int tagType)
      • getStringFromBytes

        protected java.lang.String getStringFromBytes​(int tag,
                                                      java.nio.charset.Charset cs)
      • getRationalOrDoubleString

        protected java.lang.String getRationalOrDoubleString​(int tagType)
      • getFStopDescription

        protected java.lang.String getFStopDescription​(double fStop)
      • getFocalLengthDescription

        protected java.lang.String getFocalLengthDescription​(double mm)
      • getLensSpecificationDescription

        protected java.lang.String getLensSpecificationDescription​(int tag)
      • getOrientationDescription

        protected java.lang.String getOrientationDescription​(int tag)
      • getShutterSpeedDescription

        protected java.lang.String getShutterSpeedDescription​(int tag)
      • getEncodedTextDescription

        protected java.lang.String getEncodedTextDescription​(int tagType)