velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anakreon Mejdi <ame...@ertonline.gr>
Subject Re: dynamic pictures in RTF
Date Wed, 27 Nov 2002 14:14:40 GMT
 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()


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message