mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-03 03:25:28 -04:00
TMI-136: Clean-up and added TODOs.
This commit is contained in:
parent
194f34894f
commit
821c20c09a
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user