Thread:
 Temporary Clob solution - nullSafeGet method eats ... 
 ericmason   14 Jan 2004, 06:34 
 Re: Temporary Clob solution - nullSafeGet metho... 
 rgodfrey   15 Jan 2004, 16:55 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: rgodfrey (15 Jan 2004, 16:55) Replies: 0, Views: 37987
Subject: Re: Temporary Clob solution - nullSafeGet method eats n...
Reading into a buffer using read() rather than readline() is a little 
more efficient and a bit cleaner IMO. E.g.


	char[] charbuf = new char[BUF_SIZE];

	for (int i = clobReader.read(charbuf); i > 0; i = 
clobReader.read(charbuf)) {
		sb.append(charbuf, 0, i);
	}
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]