TMI-136: Clean-up and added TODOs.

This commit is contained in:
Harald Kuhr 2015-06-05 10:58:54 +02:00
parent 194f34894f
commit 821c20c09a
2 changed files with 8 additions and 1 deletions

View File

@ -23,6 +23,9 @@ public final class IPTCWriter extends MetadataWriter {
notNull(directory, "directory");
notNull(stream, "stream");
// TODO: Make sure we always write application record version (2.00)
// TODO: Write encoding UTF8?
for (Entry entry : directory) {
int tag = (Integer) entry.getIdentifier();
Object value = entry.getValue();
@ -52,6 +55,11 @@ public final class IPTCWriter extends MetadataWriter {
stream.writeShort(data.length);
stream.write(data);
}
else if (value instanceof byte[]) {
byte[] data = (byte[]) value;
stream.writeShort(data.length);
stream.write(data);
}
else if (value instanceof Integer) {
// TODO: Need to know types from tag
stream.writeShort(2);

View File

@ -66,7 +66,6 @@ public class IPTCWriterTest extends MetadataWriterAbstractTest {
stream.close();
Directory written = createReader().read(new ByteArrayImageInputStream(bytes.toByteArray()));
System.err.println("written: " + written);
assertEquals(iptc, written);
}
}