mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
pgjindent jdbc files. First time jdbc files were formatted.
This commit is contained in:
@@ -20,51 +20,58 @@ import org.postgresql.largeobject.*;
|
||||
* This implements the Blob interface, which is basically another way to
|
||||
* access a LargeObject.
|
||||
*
|
||||
* $Id: PGclob.java,v 1.1 2001/02/16 16:45:01 peter Exp $
|
||||
* $Id: PGclob.java,v 1.2 2001/10/25 05:59:59 momjian Exp $
|
||||
*
|
||||
*/
|
||||
public class PGclob implements java.sql.Clob
|
||||
{
|
||||
private org.postgresql.Connection conn;
|
||||
private int oid;
|
||||
private LargeObject lo;
|
||||
private org.postgresql.Connection conn;
|
||||
private int oid;
|
||||
private LargeObject lo;
|
||||
|
||||
public PGclob(org.postgresql.Connection conn,int oid) throws SQLException {
|
||||
this.conn=conn;
|
||||
this.oid=oid;
|
||||
LargeObjectManager lom = conn.getLargeObjectAPI();
|
||||
this.lo = lom.open(oid);
|
||||
}
|
||||
public PGclob(org.postgresql.Connection conn, int oid) throws SQLException
|
||||
{
|
||||
this.conn = conn;
|
||||
this.oid = oid;
|
||||
LargeObjectManager lom = conn.getLargeObjectAPI();
|
||||
this.lo = lom.open(oid);
|
||||
}
|
||||
|
||||
public long length() throws SQLException {
|
||||
return lo.size();
|
||||
}
|
||||
public long length() throws SQLException
|
||||
{
|
||||
return lo.size();
|
||||
}
|
||||
|
||||
public InputStream getAsciiStream() throws SQLException {
|
||||
return lo.getInputStream();
|
||||
}
|
||||
public InputStream getAsciiStream() throws SQLException
|
||||
{
|
||||
return lo.getInputStream();
|
||||
}
|
||||
|
||||
public Reader getCharacterStream() throws SQLException {
|
||||
return new InputStreamReader(lo.getInputStream());
|
||||
}
|
||||
public Reader getCharacterStream() throws SQLException
|
||||
{
|
||||
return new InputStreamReader(lo.getInputStream());
|
||||
}
|
||||
|
||||
public String getSubString(long i,int j) throws SQLException {
|
||||
lo.seek((int)i-1);
|
||||
return new String(lo.read(j));
|
||||
}
|
||||
public String getSubString(long i, int j) throws SQLException
|
||||
{
|
||||
lo.seek((int)i - 1);
|
||||
return new String(lo.read(j));
|
||||
}
|
||||
|
||||
/*
|
||||
* For now, this is not implemented.
|
||||
*/
|
||||
public long position(String pattern,long start) throws SQLException {
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
/*
|
||||
* For now, this is not implemented.
|
||||
*/
|
||||
public long position(String pattern, long start) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
|
||||
/*
|
||||
* This should be simply passing the byte value of the pattern Blob
|
||||
*/
|
||||
public long position(Clob pattern,long start) throws SQLException {
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
/*
|
||||
* This should be simply passing the byte value of the pattern Blob
|
||||
*/
|
||||
public long position(Clob pattern, long start) throws SQLException
|
||||
{
|
||||
throw org.postgresql.Driver.notImplemented();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user