OutOfMemoryError using bytea - Mailing list pgsql-jdbc

From Robert Tyler Retzlaff
Subject OutOfMemoryError using bytea
Date
Msg-id 200201291504.CAA19395@yallara.cs.rmit.edu.au
Whole thread Raw
Responses Re: OutOfMemoryError using bytea  (Ned Wolpert <ned.wolpert@knowledgenet.com>)
List pgsql-jdbc
I'm trying to place a ~4MB LargeObject into a bytea type with the
jdbc7.2dev driver but am receiving an OutOfMemory error.

Exception in thread "main" java.lang.OutOfMemoryError:
        at java.lang.StringBuffer.expandCapacity(StringBuffer.java:202)
        at java.lang.StringBuffer.append(StringBuffer.java:496)
        at org.postgresql.util.PGbytea.toPGString(PGbytea.java:83)
        at org.postgresql.jdbc2.PreparedStatement.setBytes(PreparedStatement.java:320)
        at org.postgresql.jdbc2.PreparedStatement.setBinaryStream(PreparedStatement.java:577)
        at BlobTest.store(BlobTest.java:39)
        at BlobTest.main(BlobTest.java:90)


Is there any way to deal with this?

Thanks.

pgsql-jdbc by date:

Previous
From: runway runable
Date:
Subject: The question of jdbc
Next
From: Axel Tischer
Date:
Subject: Trouble-over