Java Doc for SQLInput.java in  » 6.0-JDK-Core » sql » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sql » java.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.sql.SQLInput

All known Subclasses:   javax.sql.rowset.serial.SQLInputImpl,
SQLInput
public interface SQLInput (Code)
An input stream that contains a stream of values representing an instance of an SQL structured type or an SQL distinct type. This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes SQLInput methods. The reader methods (readLong, readBytes, and so on) provide a way for an implementation of the SQLData interface to read the values in an SQLInput object. And as described in SQLData, calls to reader methods must be made in the order that their corresponding attributes appear in the SQL definition of the type. The method wasNull is used to determine whether the last value read was SQL NULL.

When the method getObject is called with an object of a class implementing the interface SQLData, the JDBC driver calls the method SQLData.getSQLType to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an instance of SQLInput, populating it with the attributes of the UDT. The driver then passes the input stream to the method SQLData.readSQL, which in turn calls the SQLInput reader methods in its implementation for reading the attributes from the input stream.
since:
   1.2





Method Summary
 ArrayreadArray()
     Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language.
 java.io.InputStreamreadAsciiStream()
     Reads the next attribute in the stream and returns it as a stream of ASCII characters.
 java.math.BigDecimalreadBigDecimal()
     Reads the next attribute in the stream and returns it as a java.math.BigDecimal object in the Java programming language.
 java.io.InputStreamreadBinaryStream()
     Reads the next attribute in the stream and returns it as a stream of uninterpreted bytes.
 BlobreadBlob()
     Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language.
 booleanreadBoolean()
     Reads the next attribute in the stream and returns it as a boolean in the Java programming language.
 bytereadByte()
     Reads the next attribute in the stream and returns it as a byte in the Java programming language.
 byte[]readBytes()
     Reads the next attribute in the stream and returns it as an array of bytes in the Java programming language.
 java.io.ReaderreadCharacterStream()
     Reads the next attribute in the stream and returns it as a stream of Unicode characters.
 ClobreadClob()
     Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language.
 java.sql.DatereadDate()
     Reads the next attribute in the stream and returns it as a java.sql.Date object.
 doublereadDouble()
     Reads the next attribute in the stream and returns it as a double in the Java programming language.
 floatreadFloat()
     Reads the next attribute in the stream and returns it as a float in the Java programming language.
 intreadInt()
     Reads the next attribute in the stream and returns it as an int in the Java programming language.
 longreadLong()
     Reads the next attribute in the stream and returns it as a long in the Java programming language.
 NClobreadNClob()
     Reads an SQL NCLOB value from the stream and returns it as a NClob object in the Java programming language.
 StringreadNString()
     Reads the next attribute in the stream and returns it as a String in the Java programming language.
 ObjectreadObject()
     Reads the datum at the head of the stream and returns it as an Object in the Java programming language.
 RefreadRef()
     Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language.
 RowIdreadRowId()
     Reads an SQL ROWID value from the stream and returns it as a RowId object in the Java programming language.
 SQLXMLreadSQLXML()
     Reads an SQL XML value from the stream and returns it as a SQLXML object in the Java programming language.
 shortreadShort()
     Reads the next attribute in the stream and returns it as a short in the Java programming language.
 StringreadString()
     Reads the next attribute in the stream and returns it as a String in the Java programming language.
 java.sql.TimereadTime()
     Reads the next attribute in the stream and returns it as a java.sql.Time object.
 java.sql.TimestampreadTimestamp()
     Reads the next attribute in the stream and returns it as a java.sql.Timestamp object.
 java.net.URLreadURL()
     Reads an SQL DATALINK value from the stream and returns it as a java.net.URL object in the Java programming language.
 booleanwasNull()
     Retrieves whether the last value read was SQL NULL.



Method Detail
readArray
Array readArray() throws SQLException(Code)
Reads an SQL ARRAY value from the stream and returns it as an Array object in the Java programming language. an Array object representing data of the SQLARRAY value at the head of the stream; nullif the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readAsciiStream
java.io.InputStream readAsciiStream() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a stream of ASCII characters. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readBigDecimal
java.math.BigDecimal readBigDecimal() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a java.math.BigDecimal object in the Java programming language. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readBinaryStream
java.io.InputStream readBinaryStream() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a stream of uninterpreted bytes. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readBlob
Blob readBlob() throws SQLException(Code)
Reads an SQL BLOB value from the stream and returns it as a Blob object in the Java programming language. a Blob object representing data of the SQL BLOB valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readBoolean
boolean readBoolean() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a boolean in the Java programming language. the attribute; if the value is SQL NULL, returns false
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readByte
byte readByte() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a byte in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readBytes
byte[] readBytes() throws SQLException(Code)
Reads the next attribute in the stream and returns it as an array of bytes in the Java programming language. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readCharacterStream
java.io.Reader readCharacterStream() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a stream of Unicode characters. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readClob
Clob readClob() throws SQLException(Code)
Reads an SQL CLOB value from the stream and returns it as a Clob object in the Java programming language. a Clob object representing data of the SQL CLOB valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readDate
java.sql.Date readDate() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a java.sql.Date object. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readDouble
double readDouble() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a double in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readFloat
float readFloat() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a float in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readInt
int readInt() throws SQLException(Code)
Reads the next attribute in the stream and returns it as an int in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readLong
long readLong() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a long in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readNClob
NClob readNClob() throws SQLException(Code)
Reads an SQL NCLOB value from the stream and returns it as a NClob object in the Java programming language. a NClob object representing data of the SQL NCLOB valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



readNString
String readNString() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a String in the Java programming language. It is intended for use when accessing NCHAR,NVARCHAR and LONGNVARCHAR columns. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



readObject
Object readObject() throws SQLException(Code)
Reads the datum at the head of the stream and returns it as an Object in the Java programming language. The actual type of the object returned is determined by the default type mapping, and any customizations present in this stream's type map.

A type map is registered with the stream by the JDBC driver before the stream is passed to the application.

When the datum at the head of the stream is an SQL NULL, the method returns null. If the datum is an SQL structured or distinct type, it determines the SQL type of the datum at the head of the stream. If the stream's type map has an entry for that SQL type, the driver constructs an object of the appropriate class and calls the method SQLData.readSQL on that object, which reads additional data from the stream, using the protocol described for that method. the datum at the head of the stream as an Object in theJava programming language;null if the datum is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2




readRef
Ref readRef() throws SQLException(Code)
Reads an SQL REF value from the stream and returns it as a Ref object in the Java programming language. a Ref object representing the SQL REF valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readRowId
RowId readRowId() throws SQLException(Code)
Reads an SQL ROWID value from the stream and returns it as a RowId object in the Java programming language. a RowId object representing data of the SQL ROWID valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



readSQLXML
SQLXML readSQLXML() throws SQLException(Code)
Reads an SQL XML value from the stream and returns it as a SQLXML object in the Java programming language. a SQLXML object representing data of the SQL XML valueat the head of the stream; null if the value read is SQL NULL
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.6



readShort
short readShort() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a short in the Java programming language. the attribute; if the value is SQL NULL, returns 0
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readString
String readString() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a String in the Java programming language. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readTime
java.sql.Time readTime() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a java.sql.Time object. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readTimestamp
java.sql.Timestamp readTimestamp() throws SQLException(Code)
Reads the next attribute in the stream and returns it as a java.sql.Timestamp object. the attribute; if the value is SQL NULL, returns null
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



readURL
java.net.URL readURL() throws SQLException(Code)
Reads an SQL DATALINK value from the stream and returns it as a java.net.URL object in the Java programming language. a java.net.URL object.
exception:
  SQLException - if a database access error occurs,or if a URL is malformed
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.4



wasNull
boolean wasNull() throws SQLException(Code)
Retrieves whether the last value read was SQL NULL. true if the most recently read SQL value was SQLNULL; false otherwise
exception:
  SQLException - if a database access error occurs
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not supportthis method
since:
   1.2



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.