logo       

Re: dynamic pictures in RTF: msg#00203

jakarta.velocity.user

Subject: Re: dynamic pictures in RTF

From the input stream of the BLOB object received from the database do:

StringBuffer sb = new StringBuffer();
int byte_val = is.read(); //is is the name of the InputStream
while (byte_val != -1) {
sb.append(Integer.toString(byte_val, 16));
byte_val = is.read();
}
puth the content of the StringBuffer in the Context.
Check out the documentation of java.sql.Blob java.io.InputStream
and Integer.toString()


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise