Hi,
I am having an issue here. I get an exception when I run my servlet it says:
Character to numeric conversion error
The error is happening in this block of code.
I am extracting a word document from a BLOB inside of a database. Any idea's?
while( rs.next() )
{
String doctype = rs.getString(1);
if (doctype == null)
doctype = "text/plain";
resp.setContentType(doctype);
BufferedInputStream blobData = new
BufferedInputStream(rs.getBinaryStream("object"));
byte[] bbuf = new byte[4 * 1024];
int len;
String fileToWriteBlob = "blobexample.doc";
FileOutputStream outputStream = new
FileOutputStream(fileToWriteBlob);
while ((len = blobData.read(bbuf, 0, bbuf.length)) != -1)
{
outputStream.write(bbuf, 0, len);
}
}
Thanks in advance,
Dylan del Rosario
Informix Software
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html