📄 sqlinput.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:36:29 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface SQLInput</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SQLInput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/sql/SQLData.html"><B>PREV CLASS</B></A> <A HREF="../../java/sql/SQLOutput.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SQLInput.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.sql</FONT><BR>Interface SQLInput</H2><HR><DL><DT>public interface <B>SQLInput</B></DL><P>An input stream that contains a stream of values representing an instance of an SQL structured or distinct type. This interface, used only for custom mapping, is used by the driver behind the scenes, and a programmer never directly invokes <code>SQLInput</code> methods. The <code>readXXX</code> methods provide a way to read the values in an <code>SQLInput</code> object. The method <code>wasNull</code> is used to determine whether the the last value read was SQL <code>NULL</code>. <P>When the method <code>getObject</code> is called with an object of a class implementing the interface <code>SQLData</code>, the JDBC driver calls the method <code>SQLData.getSQLType</code> to determine the SQL type of the user-defined type (UDT) being custom mapped. The driver creates an instance of <code>SQLInput</code>, populating it with the attributes of the UDT. The driver then passes the input stream to the method <code>SQLData.readSQL</code>, which in turn calls the <code>SQLInput.readXXX</code> methods in its implementation for reading the attributes from the input stream.<P><DL><DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><a href="package-summary.html#2.0 API">What Is in the JDBC 2.0 API</a></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/sql/Array.html">Array</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readArray()">readArray</A></B>()</CODE><BR> Reads an SQL <code>ARRAY</code> value from the stream and returns it as an <code>Array</code> object in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/InputStream.html">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readAsciiStream()">readAsciiStream</A></B>()</CODE><BR> Returns the next attribute in the stream as a stream of ASCII characters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readBigDecimal()">readBigDecimal</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>java.math.BigDecimal</code> object in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/InputStream.html">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readBinaryStream()">readBinaryStream</A></B>()</CODE><BR> Returns the next attribute in the stream as a stream of uninterpreted bytes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/sql/Blob.html">Blob</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readBlob()">readBlob</A></B>()</CODE><BR> Reads an SQL <code>BLOB</code> value from the stream and returns it as a <code>Blob</code> object in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readBoolean()">readBoolean</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>boolean</code> in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readByte()">readByte</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>byte</code> in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readBytes()">readBytes</A></B>()</CODE><BR> Reads the next attribute in the stream as an array of bytes in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/io/Reader.html">Reader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readCharacterStream()">readCharacterStream</A></B>()</CODE><BR> Returns the next attribute in the stream as a stream of Unicode characters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/sql/Clob.html">Clob</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readClob()">readClob</A></B>()</CODE><BR> Reads an SQL <code>CLOB</code> value from the stream and returns it as a <code>Clob</code> object in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/sql/Date.html">Date</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readDate()">readDate</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>java.sql.Date</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readDouble()">readDouble</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>double</code> in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/sql/SQLInput.html#readFloat()">readFloat</A></B>()</CODE><BR> Reads the next attribute in the stream as a <code>float</code> in the Java programming language.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -