Changeset 10862 in josm for trunk/src/com/drew/metadata/exif/ExifSubIFDDirectory.java
- Timestamp:
- 2016-08-20T20:58:03+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/metadata/exif/ExifSubIFDDirectory.java
r8243 r10862 1 1 /* 2 * Copyright 2002-201 5Drew Noakes2 * Copyright 2002-2016 Drew Noakes 3 3 * 4 4 * Licensed under the Apache License, Version 2.0 (the "License"); … … 21 21 package com.drew.metadata.exif; 22 22 23 import java.util.Date; 24 import java.util.HashMap; 25 import java.util.TimeZone; 26 23 27 import com.drew.lang.annotations.NotNull; 24 25 import java.util.HashMap; 28 import com.drew.lang.annotations.Nullable; 26 29 27 30 /** … … 61 64 return _tagNameMap; 62 65 } 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 } 63 122 }
Note:
See TracChangeset
for help on using the changeset viewer.
