我收到错误:"构造函数Document(ByteArrayInputStream)未定义"
以下代码段:
public static Document readfromDB(String filename) throws Exception
{
String sql = SELECT * FROM File where FileName = '"filename +"'";
ResultSet rs = executeQuery(sql);
if (!rs.isBeforeFirst())
throw new IllegalArgumentException (MessageFormat.format("No record found"));
rs.next
byte[] buffer = resultset.getbytes("FileContent");
ByteArrayInputStream newStream- new ByteArrayInputStream(buffer);
Document doc = new Document(newStream);
return doc;
}