~brian-thomason/+junk/ha-jdbc

« back to all changes in this revision

Viewing changes to test/net/sf/hajdbc/sql/MockClob.java

  • Committer: Brian Thomason
  • Date: 2011-12-20 17:34:21 UTC
  • Revision ID: brian.thomason@canonical.com-20111220173421-p9jg95iq91jgdihh
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * HA-JDBC: High-Availability JDBC
 
3
 * Copyright (c) 2004-2007 Paul Ferraro
 
4
 * 
 
5
 * This library is free software; you can redistribute it and/or modify it 
 
6
 * under the terms of the GNU Lesser General Public License as published by the 
 
7
 * Free Software Foundation; either version 2.1 of the License, or (at your 
 
8
 * option) any later version.
 
9
 * 
 
10
 * This library is distributed in the hope that it will be useful, but WITHOUT
 
11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 
12
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 
 
13
 * for more details.
 
14
 * 
 
15
 * You should have received a copy of the GNU Lesser General Public License
 
16
 * along with this library; if not, write to the Free Software Foundation, 
 
17
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
18
 * 
 
19
 * Contact: ferraro@users.sourceforge.net
 
20
 */
 
21
package net.sf.hajdbc.sql;
 
22
 
 
23
import java.io.InputStream;
 
24
import java.io.OutputStream;
 
25
import java.io.Reader;
 
26
import java.io.StringReader;
 
27
import java.io.Writer;
 
28
import java.sql.Clob;
 
29
import java.sql.NClob;
 
30
 
 
31
/**
 
32
 * @author Paul Ferraro
 
33
 *
 
34
 */
 
35
public class MockClob implements NClob
 
36
{
 
37
 
 
38
        /**
 
39
         * @see java.sql.Clob#free()
 
40
         */
 
41
        public void free()
 
42
        {
 
43
        }
 
44
 
 
45
        /**
 
46
         * @see java.sql.Clob#getAsciiStream()
 
47
         */
 
48
        public InputStream getAsciiStream()
 
49
        {
 
50
                return null;
 
51
        }
 
52
 
 
53
        /**
 
54
         * @see java.sql.Clob#getCharacterStream()
 
55
         */
 
56
        public Reader getCharacterStream()
 
57
        {
 
58
                return new StringReader(""); //$NON-NLS-1$
 
59
        }
 
60
 
 
61
        /**
 
62
         * @see java.sql.Clob#getCharacterStream(long, long)
 
63
         */
 
64
        public Reader getCharacterStream(long arg0, long arg1)
 
65
        {
 
66
                return new StringReader(""); //$NON-NLS-1$
 
67
        }
 
68
 
 
69
        /**
 
70
         * @see java.sql.Clob#getSubString(long, int)
 
71
         */
 
72
        public String getSubString(long arg0, int arg1)
 
73
        {
 
74
                return null;
 
75
        }
 
76
 
 
77
        /**
 
78
         * @see java.sql.Clob#length()
 
79
         */
 
80
        public long length()
 
81
        {
 
82
                return 0;
 
83
        }
 
84
 
 
85
        /**
 
86
         * @see java.sql.Clob#position(java.lang.String, long)
 
87
         */
 
88
        public long position(String arg0, long arg1)
 
89
        {
 
90
                return 0;
 
91
        }
 
92
 
 
93
        /**
 
94
         * @see java.sql.Clob#position(java.sql.Clob, long)
 
95
         */
 
96
        public long position(Clob arg0, long arg1)
 
97
        {
 
98
                return 0;
 
99
        }
 
100
 
 
101
        /**
 
102
         * @see java.sql.Clob#setAsciiStream(long)
 
103
         */
 
104
        public OutputStream setAsciiStream(long arg0)
 
105
        {
 
106
                return null;
 
107
        }
 
108
 
 
109
        /**
 
110
         * @see java.sql.Clob#setCharacterStream(long)
 
111
         */
 
112
        public Writer setCharacterStream(long arg0)
 
113
        {
 
114
                return null;
 
115
        }
 
116
 
 
117
        /**
 
118
         * @see java.sql.Clob#setString(long, java.lang.String)
 
119
         */
 
120
        public int setString(long arg0, String arg1)
 
121
        {
 
122
                return 0;
 
123
        }
 
124
 
 
125
        /**
 
126
         * @see java.sql.Clob#setString(long, java.lang.String, int, int)
 
127
         */
 
128
        public int setString(long arg0, String arg1, int arg2, int arg3)
 
129
        {
 
130
                return 0;
 
131
        }
 
132
 
 
133
        /**
 
134
         * @see java.sql.Clob#truncate(long)
 
135
         */
 
136
        public void truncate(long arg0)
 
137
        {
 
138
        }
 
139
}