~ubuntu-branches/ubuntu/oneiric/libpgjava/oneiric

« back to all changes in this revision

Viewing changes to src/interfaces/jdbc/org/postgresql/jdbc3/AbstractJdbc3Blob.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2005-04-21 14:25:11 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050421142511-wibh5vc31fkrorx7
Tags: 7.4.7-3
Built with sources...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.postgresql.jdbc3;
 
2
 
 
3
 
 
4
import java.sql.*;
 
5
 
 
6
public abstract class AbstractJdbc3Blob extends org.postgresql.jdbc2.AbstractJdbc2Blob
 
7
{
 
8
 
 
9
        public AbstractJdbc3Blob(org.postgresql.PGConnection conn, int oid) throws SQLException
 
10
        {
 
11
                super(conn, oid);
 
12
        }
 
13
 
 
14
        /**
 
15
         * Writes the given array of bytes to the <code>BLOB</code> value that
 
16
         * this <code>Blob</code> object represents, starting at position
 
17
         * <code>pos</code>, and returns the number of bytes written.
 
18
         *
 
19
         * @param pos the position in the <code>BLOB</code> object at which
 
20
         *                to start writing
 
21
         * @param bytes the array of bytes to be written to the <code>BLOB</code>
 
22
         *                value that this <code>Blob</code> object represents
 
23
         * @return the number of bytes written
 
24
         * @exception SQLException if there is an error accessing the
 
25
         *                        <code>BLOB</code> value
 
26
         * @see #getBytes
 
27
         * @since 1.4
 
28
         */
 
29
        public int setBytes(long pos, byte[] bytes) throws SQLException
 
30
        {
 
31
                throw org.postgresql.Driver.notImplemented();
 
32
        }
 
33
 
 
34
        /**
 
35
         * Writes all or part of the given <code>byte</code> array to the
 
36
         * <code>BLOB</code> value that this <code>Blob</code> object represents
 
37
         * and returns the number of bytes written.
 
38
         * Writing starts at position <code>pos</code> in the <code>BLOB</code>
 
39
         * value; <code>len</code> bytes from the given byte array are written.
 
40
         *
 
41
         * @param pos the position in the <code>BLOB</code> object at which
 
42
         *                to start writing
 
43
         * @param bytes the array of bytes to be written to this <code>BLOB</code>
 
44
         *                object
 
45
         * @param offset the offset into the array <code>bytes</code> at which
 
46
         *                to start reading the bytes to be set
 
47
         * @param len the number of bytes to be written to the <code>BLOB</code>
 
48
         *                value from the array of bytes <code>bytes</code>
 
49
         * @return the number of bytes written
 
50
         * @exception SQLException if there is an error accessing the
 
51
         *                        <code>BLOB</code> value
 
52
         * @see #getBytes
 
53
         * @since 1.4
 
54
         */
 
55
        public int setBytes(long pos, byte[] bytes, int offset, int len) throws SQLException
 
56
        {
 
57
                throw org.postgresql.Driver.notImplemented();
 
58
        }
 
59
 
 
60
        /**
 
61
         * Retrieves a stream that can be used to write to the <code>BLOB</code>
 
62
         * value that this <code>Blob</code> object represents.  The stream begins
 
63
         * at position <code>pos</code>.
 
64
         *
 
65
         * @param pos the position in the <code>BLOB</code> value at which
 
66
         *                to start writing
 
67
         * @return a <code>java.io.OutputStream</code> object to which data can
 
68
         *                 be written
 
69
         * @exception SQLException if there is an error accessing the
 
70
         *                        <code>BLOB</code> value
 
71
         * @see #getBinaryStream
 
72
         * @since 1.4
 
73
         */
 
74
        public java.io.OutputStream setBinaryStream(long pos) throws SQLException
 
75
        {
 
76
                throw org.postgresql.Driver.notImplemented();
 
77
        }
 
78
 
 
79
        /**
 
80
         * Truncates the <code>BLOB</code> value that this <code>Blob</code>
 
81
         * object represents to be <code>len</code> bytes in length.
 
82
         *
 
83
         * @param len the length, in bytes, to which the <code>BLOB</code> value
 
84
         *                that this <code>Blob</code> object represents should be truncated
 
85
         * @exception SQLException if there is an error accessing the
 
86
         *                        <code>BLOB</code> value
 
87
         * @since 1.4
 
88
         */
 
89
        public void truncate(long len) throws SQLException
 
90
        {
 
91
                throw org.postgresql.Driver.notImplemented();
 
92
        }
 
93
 
 
94
}