Changeset 10862 in josm for trunk/src/com/drew/metadata/Tag.java
- Timestamp:
- 2016-08-20T20:58:03+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/drew/metadata/Tag.java
r8132 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"); … … 54 54 /** 55 55 * Gets the tag type in hex notation as a String with padded leading 56 * zeroes if necessary (i.e. <code>0x100 E</code>).56 * zeroes if necessary (i.e. <code>0x100e</code>). 57 57 * 58 58 * @return the tag type as a string in hexadecimal notation … … 61 61 public String getTagTypeHex() 62 62 { 63 String hex = Integer.toHexString(_tagType); 64 while (hex.length() < 4) hex = "0" + hex; 65 return "0x" + hex; 63 return String.format("0x%04x", _tagType); 66 64 } 67 65 … … 117 115 118 116 /** 119 * A basic representation of the tag's type and value. EG: <code>[ FNumber] F2.8</code>.117 * A basic representation of the tag's type and value. EG: <code>[Exif IFD0] FNumber - f/2.8</code>. 120 118 * 121 119 * @return the tag's type and value
Note:
See TracChangeset
for help on using the changeset viewer.