For the second file you use the input stream twice, and in the second use it must fail:
ins = media2.getStreamData();
PdfReaderUtility pru2 = new PdfReaderUtility();
pru2.readPdfFile(ins);
String s2 = pru.readPdfFile(ins);
Look at the last two lines.
I guess that is a copy&paste mistake anyway, those two lines should have been one:
ins = media2.getStreamData();
PdfReaderUtility pru2 = new PdfReaderUtility();
String s2 = pru2.readPdfFile(ins);