1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_21) on Sat Jun 08 12:27:46 CEST 2013 -->
<title>Support (jTDS API)</title>
<meta name="date" content="2013-06-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Support (jTDS API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Support.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../net/sourceforge/jtds/jdbc/SunTest.html" title="class in net.sourceforge.jtds.jdbc"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../net/sourceforge/jtds/jdbc/SupportUnitTest.html" title="class in net.sourceforge.jtds.jdbc"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?net/sourceforge/jtds/jdbc/Support.html" target="_top">Frames</a></li>
<li><a href="Support.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">net.sourceforge.jtds.jdbc</div>
<h2 title="Class Support" class="title">Class Support</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>net.sourceforge.jtds.jdbc.Support</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Support</span>
extends java.lang.Object</pre>
<div class="block">This class contains static utility methods designed to support the
main driver classes.
<p>
Implementation notes:
<ol>
<li>The methods in this class incorporate some code from previous versions
of jTDS to handle dates, BLobs etc.
<li>This class contains routines to generate runtime messages from the resource file.
<li>The key data conversion logic used in Statements and result sets is implemented here.
<li>There is nothing here which is TDS specific.
</ol></div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Id: Support.java,v 1.56.2.6 2010-05-17 09:36:57 ickzon Exp $</dd>
<dt><span class="strong">Author:</span></dt>
<dd>Mike Hutchinson, jTDS project</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#BIG_DECIMAL_ONE">BIG_DECIMAL_ONE</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#BIG_DECIMAL_ZERO">BIG_DECIMAL_ZERO</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.sql.Date</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#DATE_ZERO">DATE_ZERO</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.Double</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#DOUBLE_ONE">DOUBLE_ONE</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.Double</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#DOUBLE_ZERO">DOUBLE_ZERO</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.Float</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#FLOAT_ONE">FLOAT_ONE</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.Float</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#FLOAT_ZERO">FLOAT_ZERO</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static char[]</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#hex">hex</a></strong></code>
<div class="block">Hex constants to use in conversion routines.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.Integer</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#INTEGER_ONE">INTEGER_ONE</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.Integer</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#INTEGER_ZERO">INTEGER_ZERO</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#LONG_ONE">LONG_ONE</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.Long</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#LONG_ZERO">LONG_ZERO</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.math.BigInteger</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MAX_VALUE_28">MAX_VALUE_28</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.math.BigInteger</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MAX_VALUE_38">MAX_VALUE_38</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MAX_VALUE_LONG_BD">MAX_VALUE_LONG_BD</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.math.BigInteger</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MAX_VALUE_LONG_BI">MAX_VALUE_LONG_BI</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MIN_VALUE_LONG_BD">MIN_VALUE_LONG_BD</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.math.BigInteger</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#MIN_VALUE_LONG_BI">MIN_VALUE_LONG_BI</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.sql.Time</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#TIME_ZERO">TIME_ZERO</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.util.HashMap</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#typeMap">typeMap</a></strong></code>
<div class="block">Convert java clases to java.sql.Type constant.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private </code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#Support()">Support</a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#calculateNamedPipeBufferSize(int, int)">calculateNamedPipeBufferSize</a></strong>(int tdsVersion,
int packetSize)</code>
<div class="block">Calculate the buffer size to use when buffering the <code>InputStream</code>
for named pipes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#castNumeric(java.lang.Object, int, int)">castNumeric</a></strong>(java.lang.Object orig,
int sourceType,
int targetType)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#convert(java.lang.Object, java.lang.Object, int, java.lang.String)">convert</a></strong>(java.lang.Object callerReference,
java.lang.Object x,
int jdbcType,
java.lang.String charSet)</code>
<div class="block">Convert an existing data object to the specified JDBC type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#convertLOB(java.lang.Object)">convertLOB</a></strong>(java.lang.Object value)</code>
<div class="block">Converts a LOB to the equivalent Java type, i.e.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#convertLOBType(int)">convertLOBType</a></strong>(int type)</code>
<div class="block">Converts a LOB type constant to the equivalent Java type constant, i.e.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static void</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#embedData(java.lang.StringBuilder, java.lang.Object, boolean, net.sourceforge.jtds.jdbc.JtdsConnection)">embedData</a></strong>(java.lang.StringBuilder buf,
java.lang.Object value,
boolean isUnicode,
<a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a> connection)</code>
<div class="block">Embed the data object as a string literal in the buffer supplied.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#encodeString(java.lang.String, java.lang.String)">encodeString</a></strong>(java.lang.String cs,
java.lang.String value)</code>
<div class="block">Encode a string into a byte array using the specified character set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getClassName(int)">getClassName</a></strong>(int jdbcType)</code>
<div class="block">Retrieve the fully qualified java class name for the
supplied JDBC Types constant.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getConnection(java.lang.Object)">getConnection</a></strong>(java.lang.Object callerReference)</code>
<div class="block">Returns the connection for a given <code>ResultSet</code>,
<code>Statement</code> or <code>Connection</code> object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getJdbcType(java.lang.Class)">getJdbcType</a></strong>(java.lang.Class typeClass)</code>
<div class="block">Get the JDBC type constant which matches the supplied <code>Class</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static int</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getJdbcType(java.lang.Object)">getJdbcType</a></strong>(java.lang.Object value)</code>
<div class="block">Get the JDBC type constant which matches the supplied Object type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getJdbcTypeName(int)">getJdbcTypeName</a></strong>(int jdbcType)</code>
<div class="block">Get a String describing the supplied JDBC type constant.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getParameterDefinitions(net.sourceforge.jtds.jdbc.ParamInfo[])">getParameterDefinitions</a></strong>(<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] parameters)</code>
<div class="block">Constructs a parameter definition string for use with
sp_executesql, sp_prepare, sp_prepexec, sp_cursoropen,
sp_cursorprepare and sp_cursorprepexec.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#getStatementKey(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[], int, java.lang.String, boolean, boolean)">getStatementKey</a></strong>(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] params,
int serverType,
java.lang.String catalog,
boolean autoCommit,
boolean cursor)</code>
<div class="block">Generates a unique statement key for a given SQL statement.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#isWindowsOS()">isWindowsOS</a></strong>()</code>
<div class="block">Checks the <code>os.name</code> system property to see if it starts
with "windows".</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.Throwable</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#linkException(java.lang.Exception, java.lang.Throwable)">linkException</a></strong>(java.lang.Exception exception,
java.lang.Throwable cause)</code>
<div class="block">Link the original cause to an <code>Exception</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.sql.SQLException</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#linkException(java.sql.SQLException, java.lang.Throwable)">linkException</a></strong>(java.sql.SQLException sqle,
java.lang.Throwable cause)</code>
<div class="block">Link the original cause to an <code>SQLException</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.sql.SQLWarning</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#linkException(java.sql.SQLWarning, java.lang.Throwable)">linkException</a></strong>(java.sql.SQLWarning sqle,
java.lang.Throwable cause)</code>
<div class="block">Link the original cause to an <code>SQLWarning</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static java.math.BigDecimal</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#normalizeBigDecimal(java.math.BigDecimal, int)">normalizeBigDecimal</a></strong>(java.math.BigDecimal value,
int maxPrecision)</code>
<div class="block">Normalize a BigDecimal value so that it fits within the
available precision.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#substituteParameters(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[], net.sourceforge.jtds.jdbc.JtdsConnection)">substituteParameters</a></strong>(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] list,
<a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a> connection)</code>
<div class="block">Substitute actual data for the parameter markers to simulate
parameter substitution in a PreparedStatement.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>(package private) static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#substituteParamMarkers(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[])">substituteParamMarkers</a></strong>(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] list)</code>
<div class="block">Update the SQL string and replace the ?</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#timeFromZone(java.util.Date, java.util.Calendar)">timeFromZone</a></strong>(java.util.Date value,
java.util.Calendar target)</code>
<div class="block">Convert a timestamp from a different Timezone.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#timeToZone(java.util.Date, java.util.Calendar)">timeToZone</a></strong>(java.util.Date value,
java.util.Calendar target)</code>
<div class="block">Convert a timestamp to a different Timezone.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../net/sourceforge/jtds/jdbc/Support.html#toHex(byte[])">toHex</a></strong>(byte[] bytes)</code>
<div class="block">Convert a byte[] object to a hex string.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="INTEGER_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INTEGER_ZERO</h4>
<pre>private static final java.lang.Integer INTEGER_ZERO</pre>
</li>
</ul>
<a name="INTEGER_ONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INTEGER_ONE</h4>
<pre>private static final java.lang.Integer INTEGER_ONE</pre>
</li>
</ul>
<a name="LONG_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONG_ZERO</h4>
<pre>private static final java.lang.Long LONG_ZERO</pre>
</li>
</ul>
<a name="LONG_ONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONG_ONE</h4>
<pre>private static final java.lang.Long LONG_ONE</pre>
</li>
</ul>
<a name="FLOAT_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLOAT_ZERO</h4>
<pre>private static final java.lang.Float FLOAT_ZERO</pre>
</li>
</ul>
<a name="FLOAT_ONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLOAT_ONE</h4>
<pre>private static final java.lang.Float FLOAT_ONE</pre>
</li>
</ul>
<a name="DOUBLE_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DOUBLE_ZERO</h4>
<pre>private static final java.lang.Double DOUBLE_ZERO</pre>
</li>
</ul>
<a name="DOUBLE_ONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DOUBLE_ONE</h4>
<pre>private static final java.lang.Double DOUBLE_ONE</pre>
</li>
</ul>
<a name="BIG_DECIMAL_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BIG_DECIMAL_ZERO</h4>
<pre>private static final java.math.BigDecimal BIG_DECIMAL_ZERO</pre>
</li>
</ul>
<a name="BIG_DECIMAL_ONE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BIG_DECIMAL_ONE</h4>
<pre>private static final java.math.BigDecimal BIG_DECIMAL_ONE</pre>
</li>
</ul>
<a name="DATE_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DATE_ZERO</h4>
<pre>private static final java.sql.Date DATE_ZERO</pre>
</li>
</ul>
<a name="TIME_ZERO">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TIME_ZERO</h4>
<pre>private static final java.sql.Time TIME_ZERO</pre>
</li>
</ul>
<a name="MIN_VALUE_LONG_BI">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MIN_VALUE_LONG_BI</h4>
<pre>private static final java.math.BigInteger MIN_VALUE_LONG_BI</pre>
</li>
</ul>
<a name="MAX_VALUE_LONG_BI">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_VALUE_LONG_BI</h4>
<pre>private static final java.math.BigInteger MAX_VALUE_LONG_BI</pre>
</li>
</ul>
<a name="MIN_VALUE_LONG_BD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MIN_VALUE_LONG_BD</h4>
<pre>private static final java.math.BigDecimal MIN_VALUE_LONG_BD</pre>
</li>
</ul>
<a name="MAX_VALUE_LONG_BD">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_VALUE_LONG_BD</h4>
<pre>private static final java.math.BigDecimal MAX_VALUE_LONG_BD</pre>
</li>
</ul>
<a name="MAX_VALUE_28">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_VALUE_28</h4>
<pre>private static final java.math.BigInteger MAX_VALUE_28</pre>
</li>
</ul>
<a name="MAX_VALUE_38">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_VALUE_38</h4>
<pre>private static final java.math.BigInteger MAX_VALUE_38</pre>
</li>
</ul>
<a name="typeMap">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typeMap</h4>
<pre>private static final java.util.HashMap typeMap</pre>
<div class="block">Convert java clases to java.sql.Type constant.</div>
</li>
</ul>
<a name="hex">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hex</h4>
<pre>private static final char[] hex</pre>
<div class="block">Hex constants to use in conversion routines.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Support()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Support</h4>
<pre>private Support()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="toHex(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toHex</h4>
<pre>public static java.lang.String toHex(byte[] bytes)</pre>
<div class="block">Convert a byte[] object to a hex string.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - The byte array to convert.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The hex equivalent as a <code>String</code>.</dd></dl>
</li>
</ul>
<a name="normalizeBigDecimal(java.math.BigDecimal, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>normalizeBigDecimal</h4>
<pre>static java.math.BigDecimal normalizeBigDecimal(java.math.BigDecimal value,
int maxPrecision)
throws java.sql.SQLException</pre>
<div class="block">Normalize a BigDecimal value so that it fits within the
available precision.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The decimal value to normalize.</dd><dd><code>maxPrecision</code> - The decimal precision supported by the server
(assumed to be a value of either 28 or 38).</dd>
<dt><span class="strong">Returns:</span></dt><dd>The possibly normalized decimal value as a <code>BigDecimal</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.sql.SQLException</code> - If the number is too big.</dd></dl>
</li>
</ul>
<a name="castNumeric(java.lang.Object, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>castNumeric</h4>
<pre>static java.lang.Object castNumeric(java.lang.Object orig,
int sourceType,
int targetType)</pre>
</li>
</ul>
<a name="convert(java.lang.Object, java.lang.Object, int, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convert</h4>
<pre>static java.lang.Object convert(java.lang.Object callerReference,
java.lang.Object x,
int jdbcType,
java.lang.String charSet)
throws java.sql.SQLException</pre>
<div class="block">Convert an existing data object to the specified JDBC type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>callerReference</code> - an object reference to the caller of this method;
must be a <code>Connection</code>,
<code>Statement</code> or <code>ResultSet</code></dd><dd><code>x</code> - the data object to convert</dd><dd><code>jdbcType</code> - the required type constant from
<code>java.sql.Types</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the converted data object</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.sql.SQLException</code> - if the conversion is not supported or fails</dd></dl>
</li>
</ul>
<a name="getJdbcType(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJdbcType</h4>
<pre>static int getJdbcType(java.lang.Object value)</pre>
<div class="block">Get the JDBC type constant which matches the supplied Object type.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - The object to analyse.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The JDBC type constant as an <code>int</code>.</dd></dl>
</li>
</ul>
<a name="getJdbcType(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJdbcType</h4>
<pre>static int getJdbcType(java.lang.Class typeClass)</pre>
<div class="block">Get the JDBC type constant which matches the supplied <code>Class</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeClass</code> - the <code>Class</code> to analyse</dd>
<dt><span class="strong">Returns:</span></dt><dd>the JDBC type constant as an <code>int</code></dd></dl>
</li>
</ul>
<a name="getJdbcTypeName(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJdbcTypeName</h4>
<pre>static java.lang.String getJdbcTypeName(int jdbcType)</pre>
<div class="block">Get a String describing the supplied JDBC type constant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jdbcType</code> - The constant to be decoded.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The text decode of the type constant as a <code>String</code>.</dd></dl>
</li>
</ul>
<a name="getClassName(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassName</h4>
<pre>static java.lang.String getClassName(int jdbcType)</pre>
<div class="block">Retrieve the fully qualified java class name for the
supplied JDBC Types constant.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jdbcType</code> - The JDBC Types constant.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The fully qualified java class name as a <code>String</code>.</dd></dl>
</li>
</ul>
<a name="embedData(java.lang.StringBuilder, java.lang.Object, boolean, net.sourceforge.jtds.jdbc.JtdsConnection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>embedData</h4>
<pre>static void embedData(java.lang.StringBuilder buf,
java.lang.Object value,
boolean isUnicode,
<a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a> connection)
throws java.sql.SQLException</pre>
<div class="block">Embed the data object as a string literal in the buffer supplied.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The buffer in which the data will be embedded.</dd><dd><code>value</code> - The data object.</dd><dd><code>isUnicode</code> - Set to <code>true</code> if Unicode strings should be used, else <code>false</code>.</dd><dd><code>connection</code> - The <a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc"><code>JtdsConnection</code></a> object.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.sql.SQLException</code></dd></dl>
</li>
</ul>
<a name="getStatementKey(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[], int, java.lang.String, boolean, boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStatementKey</h4>
<pre>static java.lang.String getStatementKey(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] params,
int serverType,
java.lang.String catalog,
boolean autoCommit,
boolean cursor)</pre>
<div class="block">Generates a unique statement key for a given SQL statement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sql</code> - the sql statement to generate the key for</dd><dd><code>params</code> - the statement parameters</dd><dd><code>serverType</code> - the type of server to generate the key for</dd><dd><code>catalog</code> - the catalog is required for uniqueness on Microsoft
SQL Server</dd><dd><code>autoCommit</code> - true if in auto commit mode</dd><dd><code>cursor</code> - true if this is a prepared cursor</dd>
<dt><span class="strong">Returns:</span></dt><dd>the unique statement key</dd></dl>
</li>
</ul>
<a name="getParameterDefinitions(net.sourceforge.jtds.jdbc.ParamInfo[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParameterDefinitions</h4>
<pre>static java.lang.String getParameterDefinitions(<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] parameters)</pre>
<div class="block">Constructs a parameter definition string for use with
sp_executesql, sp_prepare, sp_prepexec, sp_cursoropen,
sp_cursorprepare and sp_cursorprepexec.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>parameters</code> - Parameters to construct the definition for</dd>
<dt><span class="strong">Returns:</span></dt><dd>a parameter definition string</dd></dl>
</li>
</ul>
<a name="substituteParamMarkers(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substituteParamMarkers</h4>
<pre>static java.lang.String substituteParamMarkers(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] list)</pre>
<div class="block">Update the SQL string and replace the ? markers with parameter names
eg @P0, @P1 etc.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sql</code> - the SQL containing markers to substitute</dd><dd><code>list</code> - the parameter list</dd>
<dt><span class="strong">Returns:</span></dt><dd>the modified SQL as a <code>String</code></dd></dl>
</li>
</ul>
<a name="substituteParameters(java.lang.String, net.sourceforge.jtds.jdbc.ParamInfo[], net.sourceforge.jtds.jdbc.JtdsConnection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>substituteParameters</h4>
<pre>static java.lang.String substituteParameters(java.lang.String sql,
<a href="../../../../net/sourceforge/jtds/jdbc/ParamInfo.html" title="class in net.sourceforge.jtds.jdbc">ParamInfo</a>[] list,
<a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a> connection)
throws java.sql.SQLException</pre>
<div class="block">Substitute actual data for the parameter markers to simulate
parameter substitution in a PreparedStatement.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sql</code> - The SQL containing parameter markers to substitute.</dd><dd><code>list</code> - The parameter descriptors.</dd><dd><code>connection</code> - The current connection.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The modified SQL statement.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.sql.SQLException</code></dd></dl>
</li>
</ul>
<a name="encodeString(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>encodeString</h4>
<pre>static byte[] encodeString(java.lang.String cs,
java.lang.String value)</pre>
<div class="block">Encode a string into a byte array using the specified character set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cs</code> - The Charset name.</dd><dd><code>value</code> - The value to encode.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The value of the String as a <code>byte[]</code>.</dd></dl>
</li>
</ul>
<a name="linkException(java.sql.SQLWarning, java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>linkException</h4>
<pre>public static java.sql.SQLWarning linkException(java.sql.SQLWarning sqle,
java.lang.Throwable cause)</pre>
<div class="block">Link the original cause to an <code>SQLWarning</code>.
<p>
This convenience method calls <a href="../../../../net/sourceforge/jtds/jdbc/Support.html#linkException(java.lang.Exception, java.lang.Throwable)"><code>linkException(Exception, Throwable)</code></a>
and casts the result for cleaner code elsewhere.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sqle</code> - The <code>SQLWarning</code> to enhance.</dd><dd><code>cause</code> - The <code>Throwable</code> to link.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The original <code>SQLWarning</code> object.</dd></dl>
</li>
</ul>
<a name="linkException(java.sql.SQLException, java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>linkException</h4>
<pre>public static java.sql.SQLException linkException(java.sql.SQLException sqle,
java.lang.Throwable cause)</pre>
<div class="block">Link the original cause to an <code>SQLException</code>.
<p>
This convenience method calls <a href="../../../../net/sourceforge/jtds/jdbc/Support.html#linkException(java.lang.Exception, java.lang.Throwable)"><code>linkException(Exception, Throwable)</code></a>
and casts the result for cleaner code elsewhere.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sqle</code> - The <code>SQLException</code> to enhance.</dd><dd><code>cause</code> - The <code>Throwable</code> to link.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The original <code>SQLException</code> object.</dd></dl>
</li>
</ul>
<a name="linkException(java.lang.Exception, java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>linkException</h4>
<pre>public static java.lang.Throwable linkException(java.lang.Exception exception,
java.lang.Throwable cause)</pre>
<div class="block">Link the original cause to an <code>Exception</code>.
<p>
If running under JVM 1.4+ the <code>Throwable.initCause(Throwable)</code>
method will be invoked to chain the exception, else the exception is
logged via the <a href="../../../../net/sourceforge/jtds/util/Logger.html" title="class in net.sourceforge.jtds.util"><code>Logger</code></a> class.
Modeled after the code written by Brian Heineman.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>exception</code> - The <code>Exception</code> to enhance.</dd><dd><code>cause</code> - The <code>Throwable</code> to link.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The original <code>Exception</code> object.</dd></dl>
</li>
</ul>
<a name="timeToZone(java.util.Date, java.util.Calendar)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeToZone</h4>
<pre>public static long timeToZone(java.util.Date value,
java.util.Calendar target)</pre>
<div class="block">Convert a timestamp to a different Timezone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the timestamp value</dd><dd><code>target</code> - the <code>Calendar</code> containing the TimeZone</dd>
<dt><span class="strong">Returns:</span></dt><dd>the new timestamp value as a <code>long</code></dd></dl>
</li>
</ul>
<a name="timeFromZone(java.util.Date, java.util.Calendar)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>timeFromZone</h4>
<pre>public static long timeFromZone(java.util.Date value,
java.util.Calendar target)</pre>
<div class="block">Convert a timestamp from a different Timezone.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the timestamp value.</dd><dd><code>target</code> - the Calendar containing the TimeZone.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The new timestamp value as a <code>long</code>.</dd></dl>
</li>
</ul>
<a name="convertLOB(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertLOB</h4>
<pre>public static java.lang.Object convertLOB(java.lang.Object value)
throws java.sql.SQLException</pre>
<div class="block">Converts a LOB to the equivalent Java type, i.e. <code>Clob</code> to
<code>String</code> and <code>Blob</code> to <code>byte[]</code>. If the
value passed is not a LOB object, it is left unchanged and no exception
is thrown; the idea is to transparently convert only LOBs.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - an object that may be a LOB</dd>
<dt><span class="strong">Returns:</span></dt><dd>if the value was a LOB, the equivalent Java object, otherwise
the original value</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.sql.SQLException</code> - if an error occurs while reading the LOB contents</dd></dl>
</li>
</ul>
<a name="convertLOBType(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertLOBType</h4>
<pre>public static int convertLOBType(int type)</pre>
<div class="block">Converts a LOB type constant to the equivalent Java type constant, i.e.
<code>Types.CLOB</code> to <code>Types.LONGVARCHAR</code> and
<code>Types.BLOB</code> to <code>Types.LONGVARBINARY</code>. If the
type passed is not that of a LOB, it is left unchanged and no exception
is thrown; the idea is to transparently convert only LOB types.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - a <code>Types</code> constant defining a JDBC type, possibly a
LOB</dd>
<dt><span class="strong">Returns:</span></dt><dd>if the type was that of a LOB, the equivalent Java object type,
otherwise the original type</dd></dl>
</li>
</ul>
<a name="isWindowsOS()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWindowsOS</h4>
<pre>public static boolean isWindowsOS()</pre>
<div class="block">Checks the <code>os.name</code> system property to see if it starts
with "windows".</div>
<dl><dt><span class="strong">Returns:</span></dt><dd><code>true</code> if <code>os.name</code> starts with "windows",
else <code>false</code>.</dd></dl>
</li>
</ul>
<a name="getConnection(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre>private static <a href="../../../../net/sourceforge/jtds/jdbc/JtdsConnection.html" title="class in net.sourceforge.jtds.jdbc">JtdsConnection</a> getConnection(java.lang.Object callerReference)</pre>
<div class="block">Returns the connection for a given <code>ResultSet</code>,
<code>Statement</code> or <code>Connection</code> object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>callerReference</code> - an object reference to the caller of this method;
must be a <code>Connection</code>, <code>Statement</code> or
<code>ResultSet</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a connection</dd></dl>
</li>
</ul>
<a name="calculateNamedPipeBufferSize(int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>calculateNamedPipeBufferSize</h4>
<pre>static int calculateNamedPipeBufferSize(int tdsVersion,
int packetSize)</pre>
<div class="block">Calculate the buffer size to use when buffering the <code>InputStream</code>
for named pipes.
<p/>
The buffer size is tied directly to the packet size because each request
to the <code>SmbNamedPipe</code> will send a request for a particular
size of packet. In other words, if you only request 1 byte, the
<code>SmbNamedPipe</code> will send a request out and only ask for 1 byte
back. Buffering the expected packet size ensures that all of the data
will be returned in the buffer without wasting any space.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tdsVersion</code> - the TDS version for the connection</dd><dd><code>packetSize</code> - requested packet size for the connection</dd>
<dt><span class="strong">Returns:</span></dt><dd>minimum default packet size if <code>packetSize == 0</code>,
else <code>packetSize</code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Support.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../net/sourceforge/jtds/jdbc/SunTest.html" title="class in net.sourceforge.jtds.jdbc"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../net/sourceforge/jtds/jdbc/SupportUnitTest.html" title="class in net.sourceforge.jtds.jdbc"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?net/sourceforge/jtds/jdbc/Support.html" target="_top">Frames</a></li>
<li><a href="Support.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Generated on June 8 2013</small></p>
</body>
</html>
|