Re: JDBC and CLOB retrieval question
- From: Martin Gregorie <martin@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Oct 2007 23:48:04 +0100
Arne Vajhøj wrote:
Martin Gregorie wrote:Thats the case if you're moving it through a Stream as some functions do. My problem is that I need to shift it between a TEXT (the nearest Postgres has to a CLOB and the content field in a JavaMail Message or Part (a byte array). If I do a quick and dirty conversion via standard objects it looks like I'd need to go through a String or StringBuffer.Peter Fourneau wrote:if you work with a Clob:I tried to avoid using Clob because that chews up memory if you're using large amounts of data and Clobs could be multi-megabytes on occasion.
The whole point of Clob is that it avoids reading the entire object
into memory.
Looks like I'd best extend the MimeMessage and MimePart objects to let be do byte <-> char at a time conversions.
Luckily I've been away doing other things and thinking over this problem in idle moments. At least now I have a better idea of which way I need to go. I'll report back once I've worked on it.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
.
- References:
- Re: JDBC and CLOB retrieval question
- From: Arne Vajhøj
- Re: JDBC and CLOB retrieval question
- Prev by Date: static initialization of arrays
- Next by Date: Re: Why is the main() of Java void ?
- Previous by thread: Re: JDBC and CLOB retrieval question
- Next by thread: Re: JDBC and CLOB retrieval question
- Index(es):
Relevant Pages
|