I've been looking for days to find a way how to read in an Advanced Function Presentation file in so that it writes out on the console some information about the file (e.g. how many documents, how many pages a document has...).
I have successfully read in the number of byte of the AFP file.
public static void main(String[] args) {
String filename = "xxx.afp";
try {
DataInputStream in = new DataInputStream(
new BufferedInputStream(
new FileInputStream(filename))))
System.out.println(in.read());
}
}
Thanks in advance!