package cafe.test;

import java.io.IOException;

import cafe.image.png.IDATBuilder;
import cafe.image.png.IDATReader;
import cafe.string.StringUtils;

public class TestIDATReader {

	public TestIDATReader() { }
	
	public static void main(String[] args) throws IOException {
		IDATReader reader = new IDATReader();
		reader.addChunk(new IDATBuilder().data(new byte[] {1,2,3}).data(new byte[] {4,5,6}).build());
		System.out.println(StringUtils.byteArrayToHexString(reader.getData()));
	}
}
@@ -313,24 +313,30 @@
 ;%0A%09%09
-reader.addChunk(
+IDATBuilder builder = 
 new 
@@ -398,16 +398,70 @@
 %7B4,5,6%7D)
+;%0A%09%09builder.setFinish(true);%0A%09%09reader.addChunk(builder
 .build()

Revise to work with changes with IDATBuilder