本文整理了Java中com.drew.metadata.Directory.getTagName()
方法的一些代码示例,展示了Directory.getTagName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.getTagName()
方法的具体详情如下:
包路径:com.drew.metadata.Directory
类名称:Directory
方法名:getTagName
[英]Returns the name of a specified tag as a String.
[中]以字符串形式返回指定标记的名称。
代码示例来源:origin: drewnoakes/metadata-extractor
/**
* Get the name of the tag, such as <code>Aperture</code>, or
* <code>InteropVersion</code>.
*
* @return the tag's name
*/
@NotNull
public String getTagName()
{
return _directory.getTagName(_tagType);
}
代码示例来源:origin: drewnoakes/metadata-extractor
/** Returns the specified tag's value as a boolean, if possible. */
public boolean getBoolean(int tagType) throws MetadataException
{
Boolean value = getBooleanObject(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 boolean. It is of type '" + o.getClass() + "'.");
}
代码示例来源:origin: drewnoakes/metadata-extractor
/** 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() + "'.");
}
代码示例来源:origin: drewnoakes/metadata-extractor
/** Returns the specified tag's value as a double, if possible. */
public double getDouble(int tagType) throws MetadataException
{
Double value = getDoubleObject(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 double. It is of type '" + o.getClass() + "'.");
}
/** Returns the specified tag's value as a Double. If the tag is not set or cannot be converted, <code>null</code> is returned. */
代码示例来源:origin: drewnoakes/metadata-extractor
/** Returns the specified tag's value as a float, if possible. */
public float getFloat(int tagType) throws MetadataException
{
Float value = getFloatObject(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 float. It is of type '" + o.getClass() + "'.");
}
代码示例来源:origin: drewnoakes/metadata-extractor
/**
* Returns the specified tag's value as an int, if possible. Every attempt to represent the tag's value as an int
* is taken. Here is a list of the action taken depending upon the tag's original type:
* <ul>
* <li> int - Return unchanged.
* <li> Number - Return an int value (real numbers are truncated).
* <li> Rational - Truncate any fractional part and returns remaining int.
* <li> String - Attempt to parse string as an int. If this fails, convert the char[] to an int (using shifts and OR).
* <li> Rational[] - Return int value of first item in array.
* <li> byte[] - Return int value of first item in array.
* <li> int[] - Return int value of first item in array.
* </ul>
*
* @throws MetadataException if no value exists for tagType or if it cannot be converted to an int.
*/
public int getInt(int tagType) throws MetadataException
{
Integer integer = getInteger(tagType);
if (integer!=null)
return integer;
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 int. It is of type '" + o.getClass() + "'.");
}
代码示例来源:origin: com.drewnoakes/metadata-extractor
/**
* Get the name of the tag, such as <code>Aperture</code>, or
* <code>InteropVersion</code>.
*
* @return the tag's name
*/
@NotNull
public String getTagName()
{
return _directory.getTagName(_tagType);
}
代码示例来源:origin: it.tidalwave.image/image-core
/***************************************************************************
*
*
**************************************************************************/
@Override
public String getTagName (final int tag)
{
checkIfTagExists(tag);
return directory.getTagName(tag);
}
代码示例来源:origin: com.drewnoakes/metadata-extractor
/** Returns the specified tag's value as a float, if possible. */
public float getFloat(int tagType) throws MetadataException
{
Float value = getFloatObject(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 float. It is of type '" + o.getClass() + "'.");
}
代码示例来源:origin: com.drewnoakes/metadata-extractor
/** Returns the specified tag's value as a double, if possible. */
public double getDouble(int tagType) throws MetadataException
{
Double value = getDoubleObject(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 double. It is of type '" + o.getClass() + "'.");
}
/** Returns the specified tag's value as a Double. If the tag is not set or cannot be converted, <code>null</code> is returned. */
代码示例来源:origin: com.drewnoakes/metadata-extractor
/** 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() + "'.");
}
代码示例来源:origin: com.drewnoakes/metadata-extractor
/** Returns the specified tag's value as a boolean, if possible. */
public boolean getBoolean(int tagType) throws MetadataException
{
Boolean value = getBooleanObject(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 boolean. It is of type '" + o.getClass() + "'.");
}
代码示例来源:origin: stackoverflow.com
Log.d("exif", "Using tag " + exifDirectory.getTagName(datetimeTag) + " for timestamp");
代码示例来源:origin: com.drewnoakes/metadata-extractor
/**
* Returns the specified tag's value as an int, if possible. Every attempt to represent the tag's value as an int
* is taken. Here is a list of the action taken depending upon the tag's original type:
* <ul>
* <li> int - Return unchanged.
* <li> Number - Return an int value (real numbers are truncated).
* <li> Rational - Truncate any fractional part and returns remaining int.
* <li> String - Attempt to parse string as an int. If this fails, convert the char[] to an int (using shifts and OR).
* <li> Rational[] - Return int value of first item in array.
* <li> byte[] - Return int value of first item in array.
* <li> int[] - Return int value of first item in array.
* </ul>
*
* @throws MetadataException if no value exists for tagType or if it cannot be converted to an int.
*/
public int getInt(int tagType) throws MetadataException
{
Integer integer = getInteger(tagType);
if (integer!=null)
return integer;
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 int. It is of type '" + o.getClass() + "'.");
}
内容来源于网络,如有侵权,请联系作者删除!