@Nullable protected String getEpochTimeDescription(final int tagType) { // TODO have observed a byte[8] here which is likely some kind of date (ticks as long?) Long value = _directory.getLongObject(tagType); if (value == null) return null; return new Date(value).toString(); }
@Nullable protected String getIndexedDescription(final int tagType, final int baseIndex, @NotNull String... descriptions) { final Long index = _directory.getLongObject(tagType); if (index == null) return null; final long arrayIndex = index - baseIndex; if (arrayIndex >= 0 && arrayIndex < (long)descriptions.length) { String description = descriptions[(int)arrayIndex]; if (description != null) return description; } return "Unknown (" + index + ")"; }
/** Returns the specified tag's value as a long, if possible. */ public long getLong(int tagType) throws MetadataException { Long value = getLongObject(tagType); if (value != null) return value; Object o = getObject(tagType); if (o == null) throw new MetadataException("Tag '" + getTagName(tagType) + "' has not been set -- check using containsTag() first"); throw new MetadataException("Tag '" + tagType + "' cannot be converted to a long. It is of type '" + o.getClass() + "'."); }
@Nullable protected String getEpochTimeDescription(final int tagType) { // TODO have observed a byte[8] here which is likely some kind of date (ticks as long?) Long value = _directory.getLongObject(tagType); if (value == null) return null; return new Date(value).toString(); }
@Nullable protected String getIndexedDescription(final int tagType, final int baseIndex, @NotNull String... descriptions) { final Long index = _directory.getLongObject(tagType); if (index == null) return null; final long arrayIndex = index - baseIndex; if (arrayIndex >= 0 && arrayIndex < (long)descriptions.length) { String description = descriptions[(int)arrayIndex]; if (description != null) return description; } return "Unknown (" + index + ")"; }
/** Returns the specified tag's value as a long, if possible. */ public long getLong(int tagType) throws MetadataException { Long value = getLongObject(tagType); if (value != null) return value; Object o = getObject(tagType); if (o == null) throw new MetadataException("Tag '" + getTagName(tagType) + "' has not been set -- check using containsTag() first"); throw new MetadataException("Tag '" + tagType + "' cannot be converted to a long. It is of type '" + o.getClass() + "'."); }