1 message in com.mysql.lists.javabyte[] Save in mysql DB?
FromSent OnAttachments
David T. MacKenzie23 May 2001 06:28 
Subject:byte[] Save in mysql DB?
From:David T. MacKenzie (dav@especto.com)
Date:05/23/2001 06:28:58 AM
List:com.mysql.lists.java

All,

In order to save very large strings (fully-formatted HTML) in a mysql column, I have run it through java.util.zip's GZIP classes.

The result of this process is a byte[] of unknown length.

I have as yet been unsuccessful at saving and retrieving this string.

(My column is currently a blob. I am converting each byte to a char and then adding the char to a string and inserting the string to the blob. I am in no way committed to the blob type, and would actually like to avoid the byte[] <-> string translation if possible.)

At any rate, If anyone has any good strategies for storing a byte[] in a mysql column, please forward those ideas.

Live happy, code clean,