本文整理了Java中com.drew.metadata.Directory.getErrors()
方法的一些代码示例,展示了Directory.getErrors()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Directory.getErrors()
方法的具体详情如下:
包路径:com.drew.metadata.Directory
类名称:Directory
方法名:getErrors
[英]Used to iterate over any error messages contained in this directory.
[中]用于迭代此目录中包含的任何错误消息。
代码示例来源:origin: stackoverflow.com
try
{
// Extract metadata.
Metadata metadata = ImageMetadataReader.readMetadata(new BufferedInputStream(new ByteArrayInputStream(imageData)), imageData.length);
// Log each directory.
for(Directory directory : metadata.getDirectories())
{
Log.d("LOG", "Directory: " + directory.getName());
// Log all errors.
for(String error : directory.getErrors())
{
Log.d("LOG", "> error: " + error);
}
// Log all tags.
for(Tag tag : directory.getTags())
{
Log.d("LOG", "> tag: " + tag.getTagName() + " = " + tag.getDescription());
}
}
}
catch(Exception e)
{
// TODO: handle exception
}
代码示例来源:origin: drewnoakes/metadata-extractor
for (String error : directory.getErrors())
System.err.println("ERROR: " + error);
代码示例来源: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
if (!directory.hasErrors())
continue;
for (String error : directory.getErrors()) {
System.err.printf("\t[%s] %s%n", directory.getName(), error);
代码示例来源:origin: drewnoakes/metadata-extractor
if (!directory.hasErrors())
continue;
for (String error : directory.getErrors())
writer.format("[ERROR: %s] %s%s", directory.getName(), error, NEW_LINE);
代码示例来源:origin: stackoverflow.com
for (String error : directory.getErrors()) {
System.err.println("ERROR: " + error);
代码示例来源:origin: com.drewnoakes/metadata-extractor
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
if (!directory.hasErrors())
continue;
for (String error : directory.getErrors()) {
System.err.printf("\t[%s] %s%n", directory.getName(), error);
代码示例来源:origin: com.drewnoakes/metadata-extractor
if (!directory.hasErrors())
continue;
for (String error : directory.getErrors())
writer.format("[ERROR: %s] %s%s", directory.getName(), error, NEW_LINE);
内容来源于网络,如有侵权,请联系作者删除!