Appending to a large object - Mailing list pgsql-jdbc

From Ole Streicher
Subject Appending to a large object
Date
Msg-id 16166.27648.356737.926607@ebp00439.ebp.de
Whole thread Raw
Responses Re: Appending to a large object
List pgsql-jdbc
Hi,

sorry for bothering you again.

I want to append some data to a LargeObject, but I could not find out
how to do that. When I simply do

ResultSet rs = queryStmt.executeQuery();
try {
  if (rs.next()) {
    int oid = rs.getInt(1); // or wherever my Id is
    LargeObject obj = lobj.open(oid);
    System.out.println("SIze is " + obj.size();
    OutputStream os = obj.getOutputStream();
    os.write(...); // here I want to append to the existing stream
    obj.close();
    dbConn.commit();
  }
} catch (SQLException e) {
  dbConn.rollBack();
} finally {
  rs.close();
}

It is not appended to the stream but overwritten from the beginning.
The LargeObject defines some variables SEEK_SET, SEEK_END, SEEK_CUR
that seem to be useful for my purpose; however I could not find the
method to use them.

Can you give me a hint how I can append to an existing LargeObject
(using the OutputStream interface)?

Ciao

Ole

P.S. Is there a Java standard API documentation (javadoc-converted)
of the extensions (es. LargeObject handling) available?

pgsql-jdbc by date:

Previous
From: Ole Streicher
Date:
Subject: Re: Another exception (Transaction level)
Next
From: Johann Uhrmann
Date:
Subject: Asynchronous NOTIFY available?