source: josm/trunk/src/com/drew/metadata/DefaultTagDescriptor.java@ 5693

Last change on this file since 5693 was 4231, checked in by stoecker, 13 years ago

add signpost and metadata extractor code to repository directly

File size: 1.2 KB
Line 
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.
6 *
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.
9 *
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/
14 *
15 * Created by dnoakes on 22-Nov-2002 16:45:19 using IntelliJ IDEA.
16 */
17package com.drew.metadata;
18
19/**
20 *
21 */
22public class DefaultTagDescriptor extends TagDescriptor
23{
24 public DefaultTagDescriptor(Directory directory)
25 {
26 super(directory);
27 }
28
29 public String getTagName(int tagType)
30 {
31 String hex = Integer.toHexString(tagType).toUpperCase();
32 while (hex.length() < 4) hex = "0" + hex;
33 return "Unknown tag 0x" + hex;
34 }
35
36 public String getDescription(int tagType)
37 {
38 return _directory.getString(tagType);
39 }
40}
Note: See TracBrowser for help on using the repository browser.