Using Tika 1.5 getting java.io.IOException: Resetting to invalid mark while reseting the stream passed.
IOException occurs mostly for parsing pdf, zip formats.
Code snipped that I have used is
try {
// I have set the stream as BufferedInputStream of some sample.pdf
stream.mark(Integer.MAX_VALUE);
Tika t = new Tika();
String content = t.parseToString(stream);
} finally {
if(stream!=null ) {
stream.reset();
}
}
Does anybody experience this case, whether this is a bug or behaviour.
Thanks,
Praneesh
