summaryrefslogtreecommitdiff
path: root/src/interfaces/jdbc/org/postgresql/largeobject
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/jdbc/org/postgresql/largeobject')
-rw-r--r--src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java17
-rw-r--r--src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java15
-rw-r--r--src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java35
-rw-r--r--src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java45
4 files changed, 70 insertions, 42 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java b/src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java
index 0e508cfd32..0e1b9dd8a9 100644
--- a/src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java
+++ b/src/interfaces/jdbc/org/postgresql/largeobject/BlobInputStream.java
@@ -1,14 +1,21 @@
+/*-------------------------------------------------------------------------
+ *
+ * BlobInputStream.java
+ * This is an implementation of an InputStream from a large object.
+ *
+ * Copyright (c) 2003, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/Attic/BlobInputStream.java,v 1.5 2003/03/07 18:39:45 barry Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
package org.postgresql.largeobject;
import java.io.InputStream;
import java.io.IOException;
import java.sql.SQLException;
-/*
- * This is an initial implementation of an InputStream from a large object.
- * For now, the bare minimum is implemented. Later (after 7.1) we will overide
- * the other read methods to optimise them.
- */
public class BlobInputStream extends InputStream
{
/*
diff --git a/src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java b/src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java
index eb506b6771..0b863b33f0 100644
--- a/src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java
+++ b/src/interfaces/jdbc/org/postgresql/largeobject/BlobOutputStream.java
@@ -1,12 +1,21 @@
+/*-------------------------------------------------------------------------
+ *
+ * BlobOutputStream.java
+ * This implements a basic output stream that writes to a LargeObject
+ *
+ * Copyright (c) 2003, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/Attic/BlobOutputStream.java,v 1.6 2003/03/07 18:39:45 barry Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
package org.postgresql.largeobject;
import java.io.IOException;
import java.io.OutputStream;
import java.sql.SQLException;
-/*
- * This implements a basic output stream that writes to a LargeObject
- */
public class BlobOutputStream extends OutputStream
{
/*
diff --git a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java
index 5455e8e769..852b52cc8d 100644
--- a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java
+++ b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObject.java
@@ -1,17 +1,26 @@
+/*-------------------------------------------------------------------------
+ *
+ * LargeObject.java
+ * This class implements the large object interface to org.postgresql.
+ *
+ * Copyright (c) 2003, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/Attic/LargeObject.java,v 1.10 2003/03/07 18:39:45 barry Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
package org.postgresql.largeobject;
-import java.io.*;
-import java.lang.*;
-import java.net.*;
-import java.util.*;
-import java.sql.*;
-
-import org.postgresql.fastpath.*;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.sql.SQLException;
+import org.postgresql.fastpath.Fastpath;
+import org.postgresql.fastpath.FastpathArg;
/*
- * This class implements the large object interface to org.postgresql.
- *
- * <p>It provides the basic methods required to run the interface, plus
+ * This class provides the basic methods required to run the interface, plus
* a pair of methods that provide InputStream and OutputStream classes
* for this object.
*
@@ -27,12 +36,6 @@ import org.postgresql.fastpath.*;
* to a Large Object, or how to create one.
*
* @see org.postgresql.largeobject.LargeObjectManager
- * @see org.postgresql.ResultSet#getAsciiStream
- * @see org.postgresql.ResultSet#getBinaryStream
- * @see org.postgresql.ResultSet#getUnicodeStream
- * @see org.postgresql.PreparedStatement#setAsciiStream
- * @see org.postgresql.PreparedStatement#setBinaryStream
- * @see org.postgresql.PreparedStatement#setUnicodeStream
* @see java.sql.ResultSet#getAsciiStream
* @see java.sql.ResultSet#getBinaryStream
* @see java.sql.ResultSet#getUnicodeStream
diff --git a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java
index b2bbebc949..48743467db 100644
--- a/src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java
+++ b/src/interfaces/jdbc/org/postgresql/largeobject/LargeObjectManager.java
@@ -1,14 +1,30 @@
+/*-------------------------------------------------------------------------
+ *
+ * LargeObjectManager.java
+ * This class implements the large object interface to org.postgresql.
+ *
+ * It provides methods that allow client code to create, open and delete
+ * large objects from the database. When opening an object, an instance of
+ * org.postgresql.largeobject.LargeObject is returned, and its methods
+ * then allow access to the object.
+ *
+ * Copyright (c) 2003, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/largeobject/Attic/LargeObjectManager.java,v 1.10 2003/03/07 18:39:45 barry Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
package org.postgresql.largeobject;
-import org.postgresql.Driver;
-import java.io.*;
-import java.lang.*;
-import java.net.*;
-import java.util.*;
-import java.sql.*;
-import org.postgresql.fastpath.*;
-import org.postgresql.util.*;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import org.postgresql.Driver;
+import org.postgresql.core.BaseConnection;
+import org.postgresql.fastpath.Fastpath;
+import org.postgresql.fastpath.FastpathArg;
+import org.postgresql.util.PSQLException;
/*
* This class implements the large object interface to org.postgresql.
@@ -29,7 +45,7 @@ import org.postgresql.util.*;
*
* ... code that opens a connection ...
*
- * lobj = ((org.postgresql.Connection)myconn).getLargeObjectAPI();
+ * lobj = ((org.postgresql.PGConnection)myconn).getLargeObjectAPI();
* </pre>
*
* <p>Normally, client code would use the getAsciiStream, getBinaryStream,
@@ -43,13 +59,6 @@ import org.postgresql.util.*;
* <p>Refer to org.postgresql.largeobject.LargeObject on how to manipulate the
* contents of a Large Object.
*
- * @see org.postgresql.largeobject.LargeObject
- * @see org.postgresql.ResultSet#getAsciiStream
- * @see org.postgresql.ResultSet#getBinaryStream
- * @see org.postgresql.ResultSet#getUnicodeStream
- * @see org.postgresql.PreparedStatement#setAsciiStream
- * @see org.postgresql.PreparedStatement#setBinaryStream
- * @see org.postgresql.PreparedStatement#setUnicodeStream
* @see java.sql.ResultSet#getAsciiStream
* @see java.sql.ResultSet#getBinaryStream
* @see java.sql.ResultSet#getUnicodeStream
@@ -94,10 +103,10 @@ public class LargeObjectManager
* org.postgresql.Connection class keeps track of the various extension API's
* and it's advised you use those to gain access, and not going direct.
*/
- public LargeObjectManager(Connection conn) throws SQLException
+ public LargeObjectManager(BaseConnection conn) throws SQLException
{
// We need Fastpath to do anything
- this.fp = ((org.postgresql.PGConnection)conn).getFastpathAPI();
+ this.fp = conn.getFastpathAPI();
// Now get the function oid's for the api
//