⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oracle.sql.char.html

📁 Oracle JDBC 的javaDoc
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><!--NewPage--><html><head><!-- Generated by javadoc on Thu Dec 02 03:30:11 PST 1999 --><title>  Class oracle.sql.CHAR</title></head><body><a name="_top_"></a><pre><a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-oracle.sql.html">This Package</a>  <a href="oracle.sql.BLOB.html#_top_">Previous</a>  <a href="oracle.sql.CLOB.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre><hr><h1>  Class oracle.sql.CHAR</h1><pre>oracle.sql.CHAR</pre><hr><dl>  <dt> public class <b>CHAR</b></dl>The Oracle specific representation of characters.The class extends oracle.sql.Datum and interprets the bytes according toone of the Oracle supported character sets.  Each object of type oracle.sql.CHAR contains an indication of whatcharacter set to use in interpreting the bytes so one class can be usedall all the variations, such as National Character Set,Client, Database, etc.<p>For conversions that are not supported directly by CHAR (e.g. "besteffort" conversions from String) the programmer can a "best attempt" is wanted even when the conversion looses information, the"withReplacement" methods of oracle.sql.CharacterSet can be used directly.<p><dl>    <dt> <b>See Also:</b>    <dd> <a href="oracle.sql.CharacterSet.html#_top_">CharacterSet</a></dl><hr><a name="index"></a><h2>  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index"></h2><dl>  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#DEFAULT_CHARSET"><b>DEFAULT_CHARSET</b></a>  <dd> </dl><h2>  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index"></h2><dl>  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#CHAR(java.lang.Object, oracle.sql.CharacterSet)"><b>CHAR</b></a>(Object, CharacterSet)  <dd> Construct a CHAR from an Object.  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#CHAR(java.lang.String, oracle.sql.CharacterSet)"><b>CHAR</b></a>(String, CharacterSet)  <dd> Constructor for CHAR.</dl><h2>  <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl>  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#asciiStreamValue()"><b>asciiStreamValue</b></a>()  <dd> Convert to an ascii stream representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#bigDecimalValue()"><b>bigDecimalValue</b></a>()  <dd> Convert this data object into a BigDecimal.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#binaryStreamValue()"><b>binaryStreamValue</b></a>()  <dd> Convert to a binary stream representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#booleanValue()"><b>booleanValue</b></a>()  <dd> Convert to a boolean representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#byteValue()"><b>byteValue</b></a>()  <dd> Convert to a byte representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#characterStreamValue()"><b>characterStreamValue</b></a>()  <dd> Convert to a character stream representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#dateValue()"><b>dateValue</b></a>()  <dd> Convert to a Date representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#doubleValue()"><b>doubleValue</b></a>()  <dd> Convert to a double representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#floatValue()"><b>floatValue</b></a>()  <dd> Convert to a float representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getString()"><b>getString</b></a>()  <dd> Converts the sequence of characters represented by this to a String.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#intValue()"><b>intValue</b></a>()  <dd> Convert to a integer representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#isConvertibleTo(java.lang.Class)"><b>isConvertibleTo</b></a>(Class)  <dd> Test whether this data object can be converted to the specifiedJava data type.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#longValue()"><b>longValue</b></a>()  <dd> Convert to a long representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#stringValue()"><b>stringValue</b></a>()  <dd> Convert this data object into a String.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#timestampValue()"><b>timestampValue</b></a>()  <dd> Convert to a Timestamp representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#timeValue()"><b>timeValue</b></a>()  <dd> Convert to a Time representation of the datum object  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#toJdbc()"><b>toJdbc</b></a>()  <dd> Convert this data object into its default Java object type.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#toString()"><b>toString</b></a>()  <dd> Converts the characters to a String.</dl><a name="variables"></a><h2>  <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="DEFAULT_CHARSET"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>DEFAULT_CHARSET</b><pre> public static final <a href="oracle.sql.CharacterSet.html#_top_">CharacterSet</a> DEFAULT_CHARSET</pre><a name="constructors"></a><h2>  <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="CHAR"></a><a name="CHAR(java.lang.String, oracle.sql.CharacterSet)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>CHAR</b><pre> public CHAR(String str,             <a href="oracle.sql.CharacterSet.html#_top_">CharacterSet</a> charSet) throws SQLException</pre><dl>  <dd> Constructor for CHAR. <br>The String is first converted to the indicated character set. No provision ismade for loss if the CharacterSet cannot represent all Unicode characters.Although perhaps some time in the future it may throw an exception in that case.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> str - the sequence of characters (represented in Unicode).    <dd> charSet - the CharacterSet to which the string should be converted.    <dt> <b>Throws:</b> SQLException    <dd> if the attempt to convert str to charSet throwsan exception.  To avoid this, the program can first use CharacterSet.convertWithReplacement to get an array of bytes and thenuse the byte constructor.  </dl></dd></dl><a name="CHAR(java.lang.Object, oracle.sql.CharacterSet)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>CHAR</b><pre> public CHAR(Object obj,             <a href="oracle.sql.CharacterSet.html#_top_">CharacterSet</a> charSet) throws SQLException</pre><dl>  <dd> Construct a CHAR from an Object.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> objinput - data from which this class instance isconstructed.  This constructor calls obj.toString()to obtain the input string.    <dd> charSetcharacter - set of the CHAR to be created.    <dt> <b>Throws:</b> SQLException    <dd> if the input argument 'obj' is an instance of anunsupported class, or if the input object cannot beconverted into a CHAR.  </dl></dd></dl><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="getString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getString"><b>getString</b></a><pre> public String getString() throws SQLException</pre><dl>  <dd> Converts the sequence of characters represented by this to a String.<p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> a String containing the Unicode characters represented in this.    <dt> <b>Throws:</b> SQLException    <dd> if conversion from this.oracleId to UTF is notsupported    <dt> <b>Throws:</b> SQLException    <dd> if the particular cannot characters cannot beconverted without loss to Unicode.  </dl></dd></dl><a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="toString"><b>toString</b></a><pre> public String toString()</pre><dl>  <dd> Converts the characters to a String.Attempts to use getString, but if that throws an exception presents a hex representation of the individual bytes.<p></dl><a name="toJdbc()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="toJdbc"><b>toJdbc</b></a><pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -