Ignore:
Timestamp:
2016-08-20T20:58:03+02:00 (10 years ago)
Author:
Don-vip
Message:

update to metadata-extractor 2.9.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/drew/metadata/exif/ExifSubIFDDirectory.java

    r8243 r10862  
    11/*
    2  * Copyright 2002-2015 Drew Noakes
     2 * Copyright 2002-2016 Drew Noakes
    33 *
    44 *    Licensed under the Apache License, Version 2.0 (the "License");
     
    2121package com.drew.metadata.exif;
    2222
     23import java.util.Date;
     24import java.util.HashMap;
     25import java.util.TimeZone;
     26
    2327import com.drew.lang.annotations.NotNull;
    24 
    25 import java.util.HashMap;
     28import com.drew.lang.annotations.Nullable;
    2629
    2730/**
     
    6164        return _tagNameMap;
    6265    }
     66
     67    /**
     68     * Parses the date/time tag and the subsecond tag to obtain a single Date object with milliseconds
     69     * representing the date and time when this image was captured.  Attempts will be made to parse the
     70     * values as though it is in the GMT {@link TimeZone}.
     71     *
     72     * @return A Date object representing when this image was captured, if possible, otherwise null
     73     */
     74    @Nullable
     75    public Date getDateOriginal()
     76    {
     77        return getDateOriginal(null);
     78    }
     79
     80    /**
     81     * Parses the date/time tag and the subsecond tag to obtain a single Date object with milliseconds
     82     * representing the date and time when this image was captured.  Attempts will be made to parse the
     83     * values as though it is in the {@link TimeZone} represented by the {@code timeZone} parameter
     84     * (if it is non-null).
     85     *
     86     * @param timeZone the time zone to use
     87     * @return A Date object representing when this image was captured, if possible, otherwise null
     88     */
     89    @Nullable
     90    public Date getDateOriginal(TimeZone timeZone)
     91    {
     92        return getDate(TAG_DATETIME_ORIGINAL, getString(TAG_SUBSECOND_TIME_ORIGINAL), timeZone);
     93    }
     94
     95    /**
     96     * Parses the date/time tag and the subsecond tag to obtain a single Date object with milliseconds
     97     * representing the date and time when this image was digitized.  Attempts will be made to parse the
     98     * values as though it is in the GMT {@link TimeZone}.
     99     *
     100     * @return A Date object representing when this image was digitized, if possible, otherwise null
     101     */
     102    @Nullable
     103    public Date getDateDigitized()
     104    {
     105        return getDateDigitized(null);
     106    }
     107
     108    /**
     109     * Parses the date/time tag and the subsecond tag to obtain a single Date object with milliseconds
     110     * representing the date and time when this image was digitized.  Attempts will be made to parse the
     111     * values as though it is in the {@link TimeZone} represented by the {@code timeZone} parameter
     112     * (if it is non-null).
     113     *
     114     * @param timeZone the time zone to use
     115     * @return A Date object representing when this image was digitized, if possible, otherwise null
     116     */
     117    @Nullable
     118    public Date getDateDigitized(TimeZone timeZone)
     119    {
     120        return getDate(TAG_DATETIME_DIGITIZED, getString(TAG_SUBSECOND_TIME_DIGITIZED), timeZone);
     121    }
    63122}
Note: See TracChangeset for help on using the changeset viewer.