com.drew.metadata.Directory.hasErrors()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(122)

本文整理了Java中com.drew.metadata.Directory.hasErrors()方法的一些代码示例,展示了Directory.hasErrors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.hasErrors()方法的具体详情如下:
包路径:com.drew.metadata.Directory
类名称:Directory
方法名:hasErrors

Directory.hasErrors介绍

[英]Gets a value indicating whether this directory has any error messages.
[中]获取一个值,该值指示此目录是否有任何错误消息。

代码示例

代码示例来源:origin: drewnoakes/metadata-extractor

/**
 * Indicates whether any errors were reported during the reading of metadata values.
 * This value will be true if Directory.hasErrors() is true for one of the contained {@link Directory} objects.
 *
 * @return whether one of the contained directories has an error
 */
public boolean hasErrors()
{
  for (Directory directory : getDirectories()) {
    if (directory.hasErrors())
      return true;
  }
  return false;
}

代码示例来源:origin: drewnoakes/metadata-extractor

public void onExtractionSuccess(@NotNull File file, @NotNull Metadata metadata, @NotNull String relativePath, @NotNull PrintStream log)
{
  if (metadata.hasErrors()) {
    log.print(file);
    log.print('\n');
    for (Directory directory : metadata.getDirectories()) {
      if (!directory.hasErrors())
        continue;
      for (String error : directory.getErrors()) {
        log.printf("\t[%s] %s\n", directory.getName(), error);
        _errorCount++;
      }
    }
  }
}

代码示例来源:origin: drewnoakes/metadata-extractor

System.err.println(url);
for (Directory directory : metadata.getDirectories()) {
  if (!directory.hasErrors())
    continue;
  for (String error : directory.getErrors()) {

代码示例来源:origin: drewnoakes/metadata-extractor

if (!directory.hasErrors())
  continue;
for (String error : directory.getErrors())

代码示例来源:origin: com.drewnoakes/metadata-extractor

/**
 * Indicates whether any errors were reported during the reading of metadata values.
 * This value will be true if Directory.hasErrors() is true for one of the contained {@link Directory} objects.
 *
 * @return whether one of the contained directories has an error
 */
public boolean hasErrors()
{
  for (Directory directory : getDirectories()) {
    if (directory.hasErrors())
      return true;
  }
  return false;
}

代码示例来源:origin: stackoverflow.com

if (directory.hasErrors()) {
  for (String error : directory.getErrors()) {
    System.err.println("ERROR: " + error);

代码示例来源:origin: com.drewnoakes/metadata-extractor

public void onExtractionSuccess(@NotNull File file, @NotNull Metadata metadata, @NotNull String relativePath, @NotNull PrintStream log)
{
  if (metadata.hasErrors()) {
    log.print(file);
    log.print('\n');
    for (Directory directory : metadata.getDirectories()) {
      if (!directory.hasErrors())
        continue;
      for (String error : directory.getErrors()) {
        log.printf("\t[%s] %s\n", directory.getName(), error);
        _errorCount++;
      }
    }
  }
}

代码示例来源:origin: com.drewnoakes/metadata-extractor

System.err.println(url);
for (Directory directory : metadata.getDirectories()) {
  if (!directory.hasErrors())
    continue;
  for (String error : directory.getErrors()) {

代码示例来源:origin: com.drewnoakes/metadata-extractor

if (!directory.hasErrors())
  continue;
for (String error : directory.getErrors())

相关文章