source: trunk/gcc/libjava/java/sql/SQLInput.java

Last change on this file was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.2 KB
Line 
1/* SQLInput.java -- Read SQL values from a stream
2 Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
3
4This file is part of GNU Classpath.
5
6GNU Classpath is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU Classpath is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Classpath; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1902111-1307 USA.
20
21Linking this library statically or dynamically with other modules is
22making a combined work based on this library. Thus, the terms and
23conditions of the GNU General Public License cover the whole
24combination.
25
26As a special exception, the copyright holders of this library give you
27permission to link this library with independent modules to produce an
28executable, regardless of the license terms of these independent
29modules, and to copy and distribute the resulting executable under
30terms of your choice, provided that you also meet, for each linked
31independent module, the terms and conditions of the license of that
32module. An independent module is a module which is not derived from
33or based on this library. If you modify this library, you may extend
34this exception to your version of the library, but you are not
35obligated to do so. If you do not wish to do so, delete this
36exception statement from your version. */
37
38
39package java.sql;
40
41import java.io.InputStream;
42import java.io.Reader;
43import java.math.BigDecimal;
44import java.net.URL;
45
46/**
47 * This interface provides methods for reading values from a stream
48 * that is connected to a SQL structured or distinct type. It is used
49 * for custom mapping of user defined data types.
50 *
51 * @author Aaron M. Renn (arenn@urbanophile.com)
52 */
53public interface SQLInput
54{
55 /**
56 * This method reads the next item from the stream a Java
57 * <code>String</code>.
58 *
59 * @return The value read from the stream as a <code>String</code>.
60 * @exception SQLException If an error occurs.
61 */
62 public String readString() throws SQLException;
63
64 /**
65 * This method reads the next item from the stream a Java
66 * <code>boolean</code>.
67 *
68 * @return The value read from the stream as a <code>boolean</code>.
69 * @exception SQLException If an error occurs.
70 */
71 public boolean readBoolean() throws SQLException;
72
73 /**
74 * This method reads the next item from the stream a Java
75 * <code>byte</code>.
76 *
77 * @return The value read from the stream as a <code>byte</code>.
78 * @exception SQLException If an error occurs.
79 */
80 public byte readByte() throws SQLException;
81
82 /**
83 * This method reads the next item from the stream a Java
84 * <code>short</code>.
85 *
86 * @return The value read from the stream as a <code>short</code>.
87 * @exception SQLException If an error occurs.
88 */
89 public short readShort() throws SQLException;
90
91 /**
92 * This method reads the next item from the stream a Java
93 * <code>int</code>.
94 *
95 * @return The value read from the stream as an <code>int</code>.
96 * @exception SQLException If an error occurs.
97 */
98 public int readInt() throws SQLException;
99
100 /**
101 * This method reads the next item from the stream a Java
102 * <code>long</code>.
103 *
104 * @return The value read from the stream as a <code>long</code>.
105 * @exception SQLException If an error occurs.
106 */
107 public long readLong() throws SQLException;
108
109 /**
110 * This method reads the next item from the stream a Java
111 * <code>float</code>.
112 *
113 * @return The value read from the stream as a <code>float</code>.
114 * @exception SQLException If an error occurs.
115 */
116 public float readFloat() throws SQLException;
117
118 /**
119 * This method reads the next item from the stream a Java
120 * <code>double</code>.
121 *
122 * @return The value read from the stream as a <code>double</code>.
123 * @exception SQLException If an error occurs.
124 */
125 public double readDouble() throws SQLException;
126
127 /**
128 * This method reads the next item from the stream a Java
129 * <code>BigDecimal</code>.
130 *
131 * @return The value read from the stream as a <code>BigDecimal</code>.
132 * @exception SQLException If an error occurs.
133 */
134 public BigDecimal readBigDecimal() throws SQLException;
135
136 /**
137 * This method reads the next item from the stream a Java
138 * byte array
139 *
140 * @return The value read from the stream as a byte array.
141 * @exception SQLException If an error occurs.
142 */
143 public byte[] readBytes() throws SQLException;
144
145 /**
146 * This method reads the next item from the stream a Java
147 * <code>java.sql.Date</code>.
148 *
149 * @return The value read from the stream as a <code>java.sql.Date</code>.
150 * @exception SQLException If an error occurs.
151 */
152 public Date readDate() throws SQLException;
153
154 /**
155 * This method reads the next item from the stream a Java
156 * <code>java.sql.Time</code>.
157 *
158 * @return The value read from the stream as a <code>java.sql.Time</code>.
159 * @exception SQLException If an error occurs.
160 */
161 public Time readTime() throws SQLException;
162
163 /**
164 * This method reads the next item from the stream a Java
165 * <code>java.sql.Timestamp</code>.
166 *
167 * @return The value read from the stream as a <code>java.sql.Timestamp</code>.
168 * @exception SQLException If an error occurs.
169 */
170 public Timestamp readTimestamp() throws SQLException;
171
172 /**
173 * This method reads the next item from the stream a character
174 * <code>Reader</code>.
175 *
176 * @return The value read from the stream as a <code>Reader</code>.
177 * @exception SQLException If an error occurs.
178 */
179 public Reader readCharacterStream() throws SQLException;
180
181 /**
182 * This method reads the next item from the stream a ASCII text
183 * <code>InputStream</code>.
184 *
185 * @return The value read from the stream as an <code>InputStream</code>.
186 * @exception SQLException If an error occurs.
187 */
188 public InputStream readAsciiStream() throws SQLException;
189
190 /**
191 * This method reads the next item from the stream a binary
192 * <code>InputStream</code>.
193 *
194 * @return The value read from the stream as an <code>InputStream</code>.
195 * @exception SQLException If an error occurs.
196 */
197 public InputStream readBinaryStream() throws SQLException;
198
199 /**
200 * This method reads the next item from the stream a Java
201 * <code>Object</code>.
202 *
203 * @return The value read from the stream as an <code>Object</code>.
204 * @exception SQLException If an error occurs.
205 */
206 public Object readObject() throws SQLException;
207
208 /**
209 * This method reads the next item from the stream a Java SQL
210 * <code>Ref</code>.
211 *
212 * @return The value read from the stream as an <code>Ref</code>.
213 * @exception SQLException If an error occurs.
214 */
215 public Ref readRef() throws SQLException;
216
217 /**
218 * This method reads the next item from the stream a Java SQL
219 * <code>Blob</code>.
220 *
221 * @return The value read from the stream as a <code>Blob</code>.
222 * @exception SQLException If an error occurs.
223 */
224 public Blob readBlob() throws SQLException;
225
226 /**
227 * This method reads the next item from the stream a Java SQL
228 * <code>Clob</code>.
229 *
230 * @return The value read from the stream as a <code>Clob</code>.
231 * @exception SQLException If an error occurs.
232 */
233 public Clob readClob() throws SQLException;
234
235 /**
236 * This method reads the next item from the stream a Java SQL
237 * <code>Array</code>.
238 *
239 * @return The value read from the stream as an <code>Array</code>.
240 * @exception SQLException If an error occurs.
241 */
242 public Array readArray() throws SQLException;
243
244 /**
245 * This method tests whether or not the last value read was a SQL
246 * NULL value.
247 *
248 * @return <code>true</code> if the last value read was a NULL,
249 * <code>false</code> otherwise.
250 * @exception SQLException If an error occurs.
251 */
252 public boolean wasNull() throws SQLException;
253
254 /**
255 * @since 1.4
256 */
257 public URL readURL() throws SQLException;
258}
259
Note: See TracBrowser for help on using the repository browser.