📄 blob.html
字号:
</TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="length()"><!-- --></A><H3>length</H3><PRE>public long <B>length</B>() throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Returns the number of bytes in the <code>BLOB</code> value designated by this <code>Blob</code> object.<DD><DL><DT><B>Returns:</B><DD>length of the <code>BLOB</code> in bytes<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if there is an error accessing the length of the <code>BLOB</code><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></DD></DL><HR><A NAME="getBytes(long, int)"><!-- --></A><H3>getBytes</H3><PRE>public byte[] <B>getBytes</B>(long pos, int length) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Returns as an array of bytes, part or all of the <code>BLOB</code> value that this <code>Blob</code> object designates. The byte array contains up to <code>length</code> consecutive bytes starting at position <code>pos</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>pos</CODE> - the ordinal position of the first byte in the <code>BLOB</code> value to be extracted; the first byte is at position 1<DD><CODE>length</CODE> - the number of consecutive bytes to be copied<DT><B>Returns:</B><DD>a byte array containing up to <code>length</code> consecutive bytes from the <code>BLOB</code> value designated by this <code>Blob</code> object, starting with the byte at position <code>pos</code><DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if there is an error accessing the <code>BLOB</code><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></DD></DL><HR><A NAME="getBinaryStream()"><!-- --></A><H3>getBinaryStream</H3><PRE>public <A HREF="../../java/io/InputStream.html">InputStream</A> <B>getBinaryStream</B>() throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Retrieves the <code>BLOB</code> designated by this <code>Blob</code> instance as a stream.<DD><DL><DT><B>Returns:</B><DD>a stream containing the <code>BLOB</code> data<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if there is an error accessing the <code>BLOB</code><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></DD></DL><HR><A NAME="position(byte[], long)"><!-- --></A><H3>position</H3><PRE>public long <B>position</B>(byte[] pattern, long start) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Determines the byte position at which the specified byte <code>pattern</code> begins within the <code>BLOB</code> value that this <code>Blob</code> object represents. The search for <code>pattern</code> begins at position <code>start</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the byte array for which to search<DD><CODE>start</CODE> - the position at which to begin searching; the first position is 1<DT><B>Returns:</B><DD>the position at which the pattern appears, else -1<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if there is an error accessing the <code>BLOB</code><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></DD></DL><HR><A NAME="position(java.sql.Blob, long)"><!-- --></A><H3>position</H3><PRE>public long <B>position</B>(<A HREF="../../java/sql/Blob.html">Blob</A> pattern, long start) throws <A HREF="../../java/sql/SQLException.html">SQLException</A></PRE><DL><DD>Determines the byte position in the <code>BLOB</code> value designated by this <code>Blob</code> object at which <code>pattern</code> begins. The search begins at position <code>start</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the <code>Blob</code> object designating the <code>BLOB</code> value for which to search<DD><CODE>start</CODE> - the position in the <code>BLOB</code> value at which to begin searching; the first position is 1<DT><B>Returns:</B><DD>the position at which the pattern begins, else -1<DT><B>Throws:</B><DD><CODE><A HREF="../../java/sql/SQLException.html">SQLException</A></CODE> - if there is an error accessing the <code>BLOB</code><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></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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/Blob.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/Array.html"><B>PREV CLASS</B></A> <A HREF="../../java/sql/CallableStatement.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="Blob.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><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -