尝试将TiffOutputDirectory添加到TiffOutputSet总是会引发异常(Apache Sanselan)

时间:2018-12-16 19:51:17

标签: java apache

当我将TiffOutputDirectory添加到TiffOutputSet时总是会抛出异常:TiffOutputDirectory到TiffOutputSet总是会抛出异常。

FileOutputStream fos = new FileOutputStream(finalFile);
OutputStream os = new BufferedOutputStream(fos);

TiffOutputSet outputSet = new TiffOutputSet();

Message message = (Message) messanges_exif.get(i);

TiffOutputDirectory tiff = outputSet.getOrCreateExifDirectory();
String asciTifdate = exifFormat.format(message.getCreatedAt())+0x00;

TiffOutputField field = new 
TiffOutputField(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL, 
FieldType.FIELD_TYPE_ASCII, 
asciTifdate.length(),asciTifdate.getBytes());

tiff.add(field);
try {
     outputSet.addDirectory(tiff);  //Here is the error
} catch (Exception e){
     Log.e("Tiff",e.toString());
}

0 个答案:

没有答案