Margaret Fisk wrote:
>
> Does anyone know how to read the contents a database blob is
> pointing to using java?
>
This is basically a pure-JDBC question, and thus off-topic and
inappropriate, but the gratuitous 'with a java servlet' in the
subject line was amusing...
There's a tutorial on using Blobs included with the JDK docs
in the JDBC section (not the javadocs, an actual step-by-step
tutorial). You probably got it when you installed the jdk, but
if not, you can get to it from java.sun.com.
You do understand that you can't just print a byte array and
expect to get anything except gibberish? If you want chars,
you have to convert the bytes to chars, and the translation
depends on the encoding of the original bytes. (Same goes for
converting the chars to bytes when you write them to the blob
in the first place) Check the java documentation in the
"Internationalization" (I18N) section. If none of this sounds
familiar, then expect to spend some hours reading up on mime
character encodings and the 'enc' param of java.io.InputStreamReader,
OutputStreamWriter.
--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com
___________________________________________________________________________
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