/*PDFMergerUtility mergerUtility = new PDFMergerUtility();*/
while(rs.next())
{
PDFMergerUtility mergerUtility = new PDFMergerUtility();
try
{
in=resultset.getBinaryStream(1);
mergerUtility.addSource(in);
mergerUtility.setDestinationStream(bos);
mergerUtility.mergeDocuments();
}
catch (Exception e)
{
}
bos.reset();
/*How to reset/clear mergeutility object?*/
}
如果不实例化,PDFMergerUtility mergeUtility = new PDFMergerUtility(); 在while循环内,给出文件结束错误..如何在不声明while循环的情况下重用它?