for(int i = 0; i < fields.length; i++) {
final Object content = document.content(0);
switch(types[i]) {
case TEXT:
final FastBufferedReader reader = (FastBufferedReader) content;
while ((s = reader.readLine(s)) != null) {
System.out.println(s);
}
break;
default:
throw new RuntimeException("Cannot handle type " + types[i]);