LargeObjectManager lom = getLargeObjectManager(conn);
if (ob != null) {
LargeObject lo = lom.open(oid, LargeObjectManager.WRITE);
OutputStream os = lo.getOutputStream();
long size = copy((InputStream) ob, os);
lo.truncate((int) size);
lo.close();
} else {
lom.delete(oid);
row.setInt(col, -1);
}