Package com.drew.metadata
Class TagDescriptor<T extends Directory>
java.lang.Object
com.drew.metadata.TagDescriptor<T>
- Direct Known Subclasses:
AdobeJpegDescriptor,AppleMakernoteDescriptor,AppleRunTimeMakernoteDescriptor,AviDescriptor,BmpHeaderDescriptor,CanonMakernoteDescriptor,CasioType1MakernoteDescriptor,CasioType2MakernoteDescriptor,EpsDescriptor,ExifDescriptorBase,FileSystemDescriptor,FileTypeDescriptor,FujifilmMakernoteDescriptor,GifAnimationDescriptor,GifCommentDescriptor,GifControlDescriptor,GifHeaderDescriptor,GifImageDescriptor,GpsDescriptor,HeifDescriptor,HuffmanTablesDescriptor,IccDescriptor,IcoDescriptor,IptcDescriptor,JfifDescriptor,JfxxDescriptor,JpegCommentDescriptor,JpegDescriptor,KodakMakernoteDescriptor,KyoceraMakernoteDescriptor,LeicaMakernoteDescriptor,LeicaType5MakernoteDescriptor,Mp3Descriptor,Mp4Descriptor,Mp4HintDescriptor,Mp4MetaDescriptor,Mp4SoundDescriptor,Mp4TextDescriptor,Mp4UuidBoxDescriptor,Mp4VideoDescriptor,NikonType1MakernoteDescriptor,NikonType2MakernoteDescriptor,OlympusCameraSettingsMakernoteDescriptor,OlympusEquipmentMakernoteDescriptor,OlympusFocusInfoMakernoteDescriptor,OlympusImageProcessingMakernoteDescriptor,OlympusMakernoteDescriptor,OlympusRawDevelopment2MakernoteDescriptor,OlympusRawDevelopmentMakernoteDescriptor,OlympusRawInfoMakernoteDescriptor,PanasonicMakernoteDescriptor,PanasonicRawDistortionDescriptor,PanasonicRawIFD0Descriptor,PanasonicRawWbInfo2Descriptor,PanasonicRawWbInfoDescriptor,PcxDescriptor,PentaxMakernoteDescriptor,PhotoshopDescriptor,PngDescriptor,PrintIMDescriptor,PsdHeaderDescriptor,QuickTimeDescriptor,ReconyxHyperFire2MakernoteDescriptor,ReconyxHyperFireMakernoteDescriptor,ReconyxUltraFireMakernoteDescriptor,RicohMakernoteDescriptor,SamsungType2MakernoteDescriptor,SanyoMakernoteDescriptor,SigmaMakernoteDescriptor,SonyType1MakernoteDescriptor,SonyType6MakernoteDescriptor,WavDescriptor,WebpDescriptor,XmpDescriptor
Base class for all tag descriptor classes. Implementations are responsible for
providing the human-readable string representation of tag values stored in a directory.
The directory is provided to the tag descriptor via its constructor.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertBytesToVersionString(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.protected Stringget7BitStringFromBytes(int tagType) protected StringgetBitFlagDescription(int tagType, Object... labels) LSB first.protected StringgetByteLengthDescription(int tagType) protected StringgetDecimalRational(int tagType, int decimalPlaces) getDescription(int tagType) Returns a descriptive value of the specified tag for this image.protected StringgetEncodedTextDescription(int tagType) protected StringgetEpochTimeDescription(int tagType) protected static StringgetFocalLengthDescription(double mm) protected StringgetFormattedFloat(int tagType, String format) protected StringgetFormattedInt(int tagType, String format) protected StringgetFormattedString(int tagType, String format) protected static StringgetFStopDescription(double fStop) protected StringgetIndexedDescription(int tagType, int baseIndex, String... descriptions) protected StringgetIndexedDescription(int tagType, String... descriptions) protected StringgetLensSpecificationDescription(int tag) protected StringgetOrientationDescription(int tag) protected StringgetRationalOrDoubleString(int tagType) protected StringgetShutterSpeedDescription(int tag) protected StringgetSimpleRational(int tagType) protected StringgetStringFromBytes(int tag, Charset cs) protected StringgetVersionBytesDescription(int tagType, int majorDigits)
-
Field Details
-
_directory
-
-
Constructor Details
-
TagDescriptor
-
-
Method Details
-
getDescription
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 bygetString(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
nullif the tag hasn't been defined.
-
convertBytesToVersionString
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 valuesmajorDigits- 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
-
getIndexedDescription
-
getIndexedDescription
-
getByteLengthDescription
-
getSimpleRational
-
getDecimalRational
-
getFormattedInt
-
getFormattedFloat
-
getFormattedString
-
getEpochTimeDescription
-
getBitFlagDescription
LSB first. Labels may be null, a String, or a String[2] with (low label,high label) values. -
get7BitStringFromBytes
-
getStringFromBytes
-
getRationalOrDoubleString
-
getFStopDescription
-
getFocalLengthDescription
-
getLensSpecificationDescription
-
getOrientationDescription
-
getShutterSpeedDescription
-
getEncodedTextDescription
-