Changeset 6127 in josm for trunk/src/com/drew/metadata/exif/DataFormat.java
- Timestamp:
- 2013-08-09T18:05:11+02:00 (12 years ago)
- File:
-
- 1 edited
-
trunk/src/com/drew/metadata/exif/DataFormat.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/metadata/exif/DataFormat.java
r4231 r6127 1 1 /* 2 * This is public domain software - that is, you can do whatever you want 3 * with it, and include it software that is licensed under the GNU or the 4 * BSD license, or whatever other licence you choose, including proprietary 5 * closed source licenses. I do ask that you leave this header in tact. 2 * Copyright 2002-2012 Drew Noakes 6 3 * 7 * If you make modifications to this code that you think would benefit the 8 * wider community, please send me a copy and I'll post it on my site. 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 9 7 * 10 * If you make use of this code, I'd appreciate hearing about it. 11 * drew@drewnoakes.com 12 * Latest version of this software kept at 13 * http://drewnoakes.com/ 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 * 16 * More information about this project is available at: 17 * 18 * http://drewnoakes.com/code/exif/ 19 * http://code.google.com/p/metadata-extractor/ 14 20 */ 15 21 package com.drew.metadata.exif; 16 22 23 import com.drew.lang.annotations.NotNull; 17 24 import com.drew.metadata.MetadataException; 18 25 19 26 /** 20 27 * An enumeration of data formats used in the TIFF IFDs. 28 * 29 * @author Drew Noakes http://drewnoakes.com 21 30 */ 22 31 public class DataFormat 23 32 { 24 public static final DataFormat BYTE = new DataFormat("BYTE", 1); 25 public static final DataFormat STRING = new DataFormat("STRING", 2); 26 public static final DataFormat USHORT = new DataFormat("USHORT", 3); 27 public static final DataFormat ULONG = new DataFormat("ULONG", 4); 28 public static final DataFormat URATIONAL = new DataFormat("URATIONAL", 5); 29 public static final DataFormat SBYTE = new DataFormat("SBYTE", 6); 30 public static final DataFormat UNDEFINED = new DataFormat("UNDEFINED", 7); 31 public static final DataFormat SSHORT = new DataFormat("SSHORT", 8); 32 public static final DataFormat SLONG = new DataFormat("SLONG", 9); 33 public static final DataFormat SRATIONAL = new DataFormat("SRATIONAL", 10); 34 public static final DataFormat SINGLE = new DataFormat("SINGLE", 11); 35 public static final DataFormat DOUBLE = new DataFormat("DOUBLE", 12); 33 @NotNull public static final DataFormat BYTE = new DataFormat("BYTE", 1); 34 @NotNull public static final DataFormat STRING = new DataFormat("STRING", 2); 35 @NotNull public static final DataFormat USHORT = new DataFormat("USHORT", 3); 36 @NotNull public static final DataFormat ULONG = new DataFormat("ULONG", 4); 37 @NotNull public static final DataFormat URATIONAL = new DataFormat("URATIONAL", 5); 38 @NotNull public static final DataFormat SBYTE = new DataFormat("SBYTE", 6); 39 @NotNull public static final DataFormat UNDEFINED = new DataFormat("UNDEFINED", 7); 40 @NotNull public static final DataFormat SSHORT = new DataFormat("SSHORT", 8); 41 @NotNull public static final DataFormat SLONG = new DataFormat("SLONG", 9); 42 @NotNull public static final DataFormat SRATIONAL = new DataFormat("SRATIONAL", 10); 43 @NotNull public static final DataFormat SINGLE = new DataFormat("SINGLE", 11); 44 @NotNull public static final DataFormat DOUBLE = new DataFormat("DOUBLE", 12); 36 45 37 private final String myName;38 private final int value; 46 @NotNull private final String _name; 47 private final int _value; 39 48 49 @NotNull 40 50 public static DataFormat fromValue(int value) throws MetadataException 41 51 { … … 59 69 } 60 70 61 private DataFormat(String name, int value) 71 private DataFormat(@NotNull String name, int value) 62 72 { 63 myName = name;64 this.value = value;73 _name = name; 74 _value = value; 65 75 } 66 76 67 77 public int getValue() 68 78 { 69 return value; 79 return _value; 70 80 } 71 81 82 @NotNull 72 83 public String toString() 73 84 { 74 return myName;85 return _name; 75 86 } 76 87 }
Note:
See TracChangeset
for help on using the changeset viewer.
