Java Doc for SQLInput.java in  » Apache-Harmony-Java-SE » java-package » java » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.sql.SQLInput

SQLInput
public interface SQLInput (Code)
The SQLInput interface defines operations which apply to a type of input stream which carries a series of values which represent an instance of an SQL structured type or SQL distinct type.

SQLInput interface is used for custom mapping of SQL User Defined Types (UDTs)to Java classes. It is used by JDBC drivers below the level of the public interfaces and application programs do not normally use the SQLInput methods directly. Reader methods such as readLong and readBytes provide means to read values from an SQLInput stream.

When the getObject method is called with an object which implements the SQLData interface, the JDBC driver determines the SQL type of the UDT being mapped by calling the SQLData.getSQLType method. The driver creates an instance of an SQLInput stream, filling the stream with the attributes of the UDT. The SQLInput stream is passed to the SQLData.readSQL method which then calls the SQLInput reader methods to read the attributes.





Method Summary
public  ArrayreadArray()
     Returns the next attribute in the stream in the form of a java.sql.Array. the next attribute as an Array.
public  InputStreamreadAsciiStream()
     Returns the next attribute in the stream in the form of an ASCII character stream embodied as a java.io.InputStream. the next attribute as a java.io.InputStream.
public  BigDecimalreadBigDecimal()
     Returns the next attribute in the stream in the form of a java.math.BigDecimal. the attribute as a java.math.BigDecimal.
public  InputStreamreadBinaryStream()
     Returns the next attribute in the stream in the form of a stream of bytes embodied as a java.io.InputStream. the next attribute as a java.io.InputStream.
public  BlobreadBlob()
     Returns the next attribute in the stream in the form of a java.sql.Blob. the next attribute as a java.sql.Blob.
public  booleanreadBoolean()
     Returns the next attribute in the stream in the form of a boolean. the next attribute as a boolean.
public  bytereadByte()
     Returns the next attribute in the stream in the form of a byte. the next attribute as a byte.
public  byte[]readBytes()
     Returns the next attribute in the stream in the form of a byte array. the attribute as a byte array.
public  ReaderreadCharacterStream()
     Returns the next attribute in the stream in the form of a Unicode character stream embodied as a java.io.Reader. the next attribute as a java.io.Reader.
public  ClobreadClob()
     Returns the next attribute in the stream in the form of a java.sql.Clob. the next attribute as a java.sql.Clob.
public  DatereadDate()
     Returns the next attribute in the stream in the form of a java.sql.Date. the next attribute as a java.sql.Date.
public  doublereadDouble()
     Returns the next attribute in the stream in the form of a double. the next attribute as a double.
public  floatreadFloat()
     Returns the next attribute in the stream in the form of a float. the next attribute as a float.
public  intreadInt()
     Returns the next attribute in the stream in the form of an int. the next attribute as an int.
public  longreadLong()
     Returns the next attribute in the stream in the form of a long. the next attribute as a long.
public  ObjectreadObject()
     Returns the next attribute in the stream in the form of a java.lang.Object.

The type of the Object returned is determined by the type mapping for this JDBC driver, including any customized mappings in force.

public  RefreadRef()
     Returns the next attribute in the stream in the form of a java.sql.Ref. the next attribute as a java.sql.Ref.
public  shortreadShort()
     Returns the next attribute in the stream in the form of a short. the next attribute as a short.
public  StringreadString()
     Returns the next attribute in the stream in the form of a String. the next attribute as a String.
public  TimereadTime()
     Returns the next attribute in the stream in the form of a java.sql.Time. the attribute as a java.sql.Time.
public  TimestampreadTimestamp()
     Returns the next attribute in the stream in the form of a java.sql.Timestamp. the attribute as a java.sql.Timestamp.
public  URLreadURL()
     Reads the next attribute in the stream (SQL DATALINK value) and returns it as a java.net.URL object. the next attribute as a java.net.URL.
public  booleanwasNull()
     Reports whether the last value read was SQL NULL.



Method Detail
readArray
public Array readArray() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Array. the next attribute as an Array. null if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readAsciiStream
public InputStream readAsciiStream() throws SQLException(Code)
Returns the next attribute in the stream in the form of an ASCII character stream embodied as a java.io.InputStream. the next attribute as a java.io.InputStream. null if the value isSQL NULL.
throws:
  SQLException - if there is a database error



readBigDecimal
public BigDecimal readBigDecimal() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.math.BigDecimal. the attribute as a java.math.BigDecimal. null if the read returnsSQL NULL.
throws:
  SQLException - if there is a database error



readBinaryStream
public InputStream readBinaryStream() throws SQLException(Code)
Returns the next attribute in the stream in the form of a stream of bytes embodied as a java.io.InputStream. the next attribute as a java.io.InputStream. null if the value isSQL NULL.
throws:
  SQLException - if there is a database error



readBlob
public Blob readBlob() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Blob. the next attribute as a java.sql.Blob. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



readBoolean
public boolean readBoolean() throws SQLException(Code)
Returns the next attribute in the stream in the form of a boolean. the next attribute as a boolean. false if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readByte
public byte readByte() throws SQLException(Code)
Returns the next attribute in the stream in the form of a byte. the next attribute as a byte. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readBytes
public byte[] readBytes() throws SQLException(Code)
Returns the next attribute in the stream in the form of a byte array. the attribute as a byte array. null if the read returns SQL NULL.
throws:
  SQLException - if there is a database error



readCharacterStream
public Reader readCharacterStream() throws SQLException(Code)
Returns the next attribute in the stream in the form of a Unicode character stream embodied as a java.io.Reader. the next attribute as a java.io.Reader. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



readClob
public Clob readClob() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Clob. the next attribute as a java.sql.Clob. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



readDate
public Date readDate() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Date. the next attribute as a java.sql.Date. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



readDouble
public double readDouble() throws SQLException(Code)
Returns the next attribute in the stream in the form of a double. the next attribute as a double. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readFloat
public float readFloat() throws SQLException(Code)
Returns the next attribute in the stream in the form of a float. the next attribute as a float. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readInt
public int readInt() throws SQLException(Code)
Returns the next attribute in the stream in the form of an int. the next attribute as an int. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readLong
public long readLong() throws SQLException(Code)
Returns the next attribute in the stream in the form of a long. the next attribute as a long. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readObject
public Object readObject() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.lang.Object.

The type of the Object returned is determined by the type mapping for this JDBC driver, including any customized mappings in force. A type map is given to the SQLInput by the JDBC driver before the SQLInput is given to the application.

If the attribute is an SQL structured or distinct type, its SQL type is determined. If the streams type map contains an element for that SQL type, the driver creates an object of relevant type and invokes the method SQLData.readSQL on it, which reads supplementary data from the stream using whichever protocol is defined for that method. the next attribute as an Object. null if the value is SQL NULL.
throws:
  SQLException - if there is a database error




readRef
public Ref readRef() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Ref. the next attribute as a java.sql.Ref. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



readShort
public short readShort() throws SQLException(Code)
Returns the next attribute in the stream in the form of a short. the next attribute as a short. 0 if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readString
public String readString() throws SQLException(Code)
Returns the next attribute in the stream in the form of a String. the next attribute as a String. null if the value is SQL NULL.
throws:
  SQLException - if there is a database error



readTime
public Time readTime() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Time. the attribute as a java.sql.Time. null if the read returns SQLNULL.
throws:
  SQLException - if there is a database error



readTimestamp
public Timestamp readTimestamp() throws SQLException(Code)
Returns the next attribute in the stream in the form of a java.sql.Timestamp. the attribute as a java.sql.Timestamp. null if the read returnsSQL NULL.
throws:
  SQLException - if there is a database error



readURL
public URL readURL() throws SQLException(Code)
Reads the next attribute in the stream (SQL DATALINK value) and returns it as a java.net.URL object. the next attribute as a java.net.URL. null if the value is SQLNULL.
throws:
  SQLException - if there is a database error



wasNull
public boolean wasNull() throws SQLException(Code)
Reports whether the last value read was SQL NULL. true if the last value read was SQL NULL, false otherwise.
throws:
  SQLException - if there is a database error



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