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 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_11) on Sat Aug 18 11:01:00 CEST 2007 -->
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<TITLE>
HttpConnection (HttpClient 3.1 API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.commons.httpclient.HttpConnection class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="HttpConnection (HttpClient 3.1 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/HttpConnection.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-all.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/httpclient/HttpClientError.html" title="class in org.apache.commons.httpclient"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/commons/httpclient/HttpConnection.html" target="_top"><B>FRAMES</B></A>
<A HREF="HttpConnection.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.httpclient</FONT>
<BR>
Class HttpConnection</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.httpclient.HttpConnection</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>HttpConnection</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
</PRE>
<P>
An abstraction of an HTTP <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> and <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io"><CODE>OutputStream</CODE></A>
pair, together with the relevant attributes.
<p>
The following options are set on the socket before getting the input/output
streams in the <A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#open()"><CODE>open()</CODE></A> method:
<table border=1><tr>
<th>Socket Method
<th>Sockets Option
<th>Configuration
</tr><tr>
<td><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setTcpNoDelay(boolean)" title="class or interface in java.net"><CODE>Socket.setTcpNoDelay(boolean)</CODE></A>
<td>SO_NODELAY
<td><A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setTcpNoDelay(boolean)"><CODE>HttpConnectionParams.setTcpNoDelay(boolean)</CODE></A>
</tr><tr>
<td><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int)" title="class or interface in java.net"><CODE>Socket.setSoTimeout(int)</CODE></A>
<td>SO_TIMEOUT
<td><A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSoTimeout(int)"><CODE>HttpConnectionParams.setSoTimeout(int)</CODE></A>
</tr><tr>
<td><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSendBufferSize(int)" title="class or interface in java.net"><CODE>Socket.setSendBufferSize(int)</CODE></A>
<td>SO_SNDBUF
<td><A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSendBufferSize(int)"><CODE>HttpConnectionParams.setSendBufferSize(int)</CODE></A>
</tr><tr>
<td><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setReceiveBufferSize(int)" title="class or interface in java.net"><CODE>Socket.setReceiveBufferSize(int)</CODE></A>
<td>SO_RCVBUF
<td><A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setReceiveBufferSize(int)"><CODE>HttpConnectionParams.setReceiveBufferSize(int)</CODE></A>
</tr></table>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $</DD>
<DT><B>Author:</B></DT>
<DD>Rod Waldhoff, Sean C. Sullivan, Ortwin Glueck, <a href="mailto:jsdever@apache.org">Jeff Dever</a>, <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>, <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>, Michael Becke, Eric E Johnson, Laura Werner</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isOpen">isOpen</A></B></CODE>
<BR>
Whether or not the connection is connected.</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(org.apache.commons.httpclient.HostConfiguration)">HttpConnection</A></B>(<A HREF="../../../../org/apache/commons/httpclient/HostConfiguration.html" title="class in org.apache.commons.httpclient">HostConfiguration</A> hostConfiguration)</CODE>
<BR>
Creates a new HTTP connection for the given host configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, int)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port)</CODE>
<BR>
Creates a new HTTP connection for the given host and port.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</CODE>
<BR>
Creates a new HTTP connection for the given host and port
using the given protocol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, int, java.lang.String, int)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port)</CODE>
<BR>
Creates a new HTTP connection for the given host and port via the
given proxy host and port using the default protocol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, int, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</CODE>
<BR>
Creates a new HTTP connection for the given host with the virtual
alias and port via the given proxy host and port using the given
protocol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, int, java.lang.String, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> virtualHost,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</CODE>
<BR>
<B>Deprecated.</B> <I>use #HttpConnection(String, int, String, int, Protocol)</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#HttpConnection(java.lang.String, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)">HttpConnection</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> virtualHost,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</CODE>
<BR>
Creates a new HTTP connection for the given host with the virtual
alias and port using given protocol.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#assertNotOpen()">assertNotOpen</A></B>()</CODE>
<BR>
Throws an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> if the connection is already open.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#assertOpen()">assertOpen</A></B>()</CODE>
<BR>
Throws an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> if the connection is not open.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#close()">close</A></B>()</CODE>
<BR>
Closes the socket and streams.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#closeIfStale()">closeIfStale</A></B>()</CODE>
<BR>
Closes the connection if stale.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#closeSocketAndStreams()">closeSocketAndStreams</A></B>()</CODE>
<BR>
Closes everything out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#flushRequestOutputStream()">flushRequestOutputStream</A></B>()</CODE>
<BR>
Flushes the output request stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getHost()">getHost</A></B>()</CODE>
<BR>
Returns the host.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient">HttpConnectionManager</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getHttpConnectionManager()">getHttpConnectionManager</A></B>()</CODE>
<BR>
Returns the httpConnectionManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getLastResponseInputStream()">getLastResponseInputStream</A></B>()</CODE>
<BR>
Returns the stream used to read the last response's body.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getLocalAddress()">getLocalAddress</A></B>()</CODE>
<BR>
Return the local address used when creating the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params">HttpConnectionParams</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()">getParams</A></B>()</CODE>
<BR>
Returns <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HTTP protocol parameters</CODE></A> associated with this method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getPort()">getPort</A></B>()</CODE>
<BR>
Returns the port of the host.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getProtocol()">getProtocol</A></B>()</CODE>
<BR>
Returns the protocol used to establish the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getProxyHost()">getProxyHost</A></B>()</CODE>
<BR>
Returns the proxy host.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getProxyPort()">getProxyPort</A></B>()</CODE>
<BR>
Returns the port of the proxy host.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getRequestOutputStream()">getRequestOutputStream</A></B>()</CODE>
<BR>
Returns an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io"><CODE>OutputStream</CODE></A> suitable for writing the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getResponseInputStream()">getResponseInputStream</A></B>()</CODE>
<BR>
Return a <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> suitable for reading the response.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getSendBufferSize()">getSendBufferSize</A></B>()</CODE>
<BR>
Gets the socket's sendBufferSize.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getSocket()">getSocket</A></B>()</CODE>
<BR>
Returns the connection socket.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getSoTimeout()">getSoTimeout</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#getSoTimeout()"><CODE>HttpConnectionParams.getSoTimeout()</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getVirtualHost()">getVirtualHost</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>no longer applicable</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isLocked()">isLocked</A></B>()</CODE>
<BR>
Tests if the connection is locked.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isOpen()">isOpen</A></B>()</CODE>
<BR>
Tests if the connection is open.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isProxied()">isProxied</A></B>()</CODE>
<BR>
Returns <tt>true</tt> if the connection is established via a proxy,
<tt>false</tt> otherwise.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isResponseAvailable()">isResponseAvailable</A></B>()</CODE>
<BR>
Tests if input data avaialble.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isResponseAvailable(int)">isResponseAvailable</A></B>(int timeout)</CODE>
<BR>
Tests if input data becomes available within the given period time in milliseconds.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isSecure()">isSecure</A></B>()</CODE>
<BR>
Returns <tt>true</tt> if the connection is established over
a secure protocol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isStale()">isStale</A></B>()</CODE>
<BR>
Determines whether this connection is "stale", which is to say that either
it is no longer open, or an attempt to read the connection would fail.</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="../../../../org/apache/commons/httpclient/HttpConnection.html#isStaleCheckingEnabled()">isStaleCheckingEnabled</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#isStaleCheckingEnabled()"><CODE>HttpConnectionParams.isStaleCheckingEnabled()</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></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="../../../../org/apache/commons/httpclient/HttpConnection.html#isTransparent()">isTransparent</A></B>()</CODE>
<BR>
Indicates if the connection is completely transparent from end to end.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#open()">open</A></B>()</CODE>
<BR>
Establishes a connection to the specified host and port
(via a proxy if specified).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#print(java.lang.String)">print</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#print(java.lang.String, java.lang.String)"><CODE>print(String, String)</CODE></A>
Writes the specified String (as bytes) to the output stream.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#print(java.lang.String, java.lang.String)">print</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)</CODE>
<BR>
Writes the specified String (as bytes) to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#printLine()">printLine</A></B>()</CODE>
<BR>
Writes <tt>"\r\n".getBytes()</tt> to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#printLine(java.lang.String)">printLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#printLine(java.lang.String, java.lang.String)"><CODE>printLine(String, String)</CODE></A>
Writes the specified String (as bytes), followed by
<tt>"\r\n".getBytes()</tt> to the output stream.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#printLine(java.lang.String, java.lang.String)">printLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)</CODE>
<BR>
Writes the specified String (as bytes), followed by
<tt>"\r\n".getBytes()</tt> to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#readLine()">readLine</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>use #readLine(String)</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#readLine(java.lang.String)">readLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)</CODE>
<BR>
Reads up to <tt>"\n"</tt> from the (unchunked) input stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#releaseConnection()">releaseConnection</A></B>()</CODE>
<BR>
Releases the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setConnectionTimeout(int)">setConnectionTimeout</A></B>(int timeout)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setConnectionTimeout(int)"><CODE>HttpConnectionParams.setConnectionTimeout(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setHost(java.lang.String)">setHost</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)</CODE>
<BR>
Sets the host to connect to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setHttpConnectionManager(org.apache.commons.httpclient.HttpConnectionManager)">setHttpConnectionManager</A></B>(<A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient">HttpConnectionManager</A> httpConnectionManager)</CODE>
<BR>
Sets the httpConnectionManager.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setLastResponseInputStream(java.io.InputStream)">setLastResponseInputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inStream)</CODE>
<BR>
Set the state to keep track of the last response for the last request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setLocalAddress(java.net.InetAddress)">setLocalAddress</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A> localAddress)</CODE>
<BR>
Set the local address used when creating the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setLocked(boolean)">setLocked</A></B>(boolean locked)</CODE>
<BR>
Locks or unlocks the connection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setParams(org.apache.commons.httpclient.params.HttpConnectionParams)">setParams</A></B>(<A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params">HttpConnectionParams</A> params)</CODE>
<BR>
Assigns <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HTTP protocol parameters</CODE></A> for this method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setPort(int)">setPort</A></B>(int port)</CODE>
<BR>
Sets the port to connect to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setProtocol(org.apache.commons.httpclient.protocol.Protocol)">setProtocol</A></B>(<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</CODE>
<BR>
Sets the protocol used to establish the connection</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setProxyHost(java.lang.String)">setProxyHost</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)</CODE>
<BR>
Sets the host to proxy through.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setProxyPort(int)">setProxyPort</A></B>(int port)</CODE>
<BR>
Sets the port of the host to proxy through.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setSendBufferSize(int)">setSendBufferSize</A></B>(int sendBufferSize)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSendBufferSize(int)"><CODE>HttpConnectionParams.setSendBufferSize(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setSocketTimeout(int)">setSocketTimeout</A></B>(int timeout)</CODE>
<BR>
Sets <code>SO_TIMEOUT</code> value directly on the underlying <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>socket</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setSoTimeout(int)">setSoTimeout</A></B>(int timeout)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSoTimeout(int)"><CODE>HttpConnectionParams.setSoTimeout(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setStaleCheckingEnabled(boolean)">setStaleCheckingEnabled</A></B>(boolean staleCheckEnabled)</CODE>
<BR>
<B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setStaleCheckingEnabled(boolean)"><CODE>HttpConnectionParams.setStaleCheckingEnabled(boolean)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#setVirtualHost(java.lang.String)">setVirtualHost</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)</CODE>
<BR>
<B>Deprecated.</B> <I>no longer applicable</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#shutdownOutput()">shutdownOutput</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>unused</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#tunnelCreated()">tunnelCreated</A></B>()</CODE>
<BR>
Instructs the proxy to establish a secure tunnel to the host.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#write(byte[])">write</A></B>(byte[] data)</CODE>
<BR>
Writes the specified bytes to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#write(byte[], int, int)">write</A></B>(byte[] data,
int offset,
int length)</CODE>
<BR>
Writes <i>length</i> bytes in <i>data</i> starting at
<i>offset</i> to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#writeLine()">writeLine</A></B>()</CODE>
<BR>
Writes <tt>"\r\n".getBytes()</tt> to the output stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#writeLine(byte[])">writeLine</A></B>(byte[] data)</CODE>
<BR>
Writes the specified bytes, followed by <tt>"\r\n".getBytes()</tt> to the
output stream.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="isOpen"><!-- --></A><H3>
isOpen</H3>
<PRE>
protected boolean <B>isOpen</B></PRE>
<DL>
<DD>Whether or not the connection is connected.
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="HttpConnection(java.lang.String, int)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host and port.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to connect to<DD><CODE>port</CODE> - the port to connect to</DL>
</DL>
<HR>
<A NAME="HttpConnection(java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host and port
using the given protocol.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to connect to<DD><CODE>port</CODE> - the port to connect to<DD><CODE>protocol</CODE> - the protocol to use</DL>
</DL>
<HR>
<A NAME="HttpConnection(java.lang.String, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> virtualHost,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host with the virtual
alias and port using given protocol.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to connect to<DD><CODE>virtualHost</CODE> - the virtual host requests will be sent to<DD><CODE>port</CODE> - the port to connect to<DD><CODE>protocol</CODE> - the protocol to use</DL>
</DL>
<HR>
<A NAME="HttpConnection(java.lang.String, int, java.lang.String, int)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host and port via the
given proxy host and port using the default protocol.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>proxyHost</CODE> - the host to proxy via<DD><CODE>proxyPort</CODE> - the port to proxy via<DD><CODE>host</CODE> - the host to connect to<DD><CODE>port</CODE> - the port to connect to</DL>
</DL>
<HR>
<A NAME="HttpConnection(org.apache.commons.httpclient.HostConfiguration)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="../../../../org/apache/commons/httpclient/HostConfiguration.html" title="class in org.apache.commons.httpclient">HostConfiguration</A> hostConfiguration)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host configuration.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>hostConfiguration</CODE> - the host/proxy/protocol to use</DL>
</DL>
<HR>
<A NAME="HttpConnection(java.lang.String, int, java.lang.String, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> virtualHost,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</PRE>
<DL>
<DD><B>Deprecated.</B> <I>use #HttpConnection(String, int, String, int, Protocol)</I>
<P>
<DD>Creates a new HTTP connection for the given host with the virtual
alias and port via the given proxy host and port using the given
protocol.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>proxyHost</CODE> - the host to proxy via<DD><CODE>proxyPort</CODE> - the port to proxy via<DD><CODE>host</CODE> - the host to connect to. Parameter value must be non-null.<DD><CODE>virtualHost</CODE> - No longer applicable.<DD><CODE>port</CODE> - the port to connect to<DD><CODE>protocol</CODE> - The protocol to use. Parameter value must be non-null.</DL>
</DL>
<HR>
<A NAME="HttpConnection(java.lang.String, int, java.lang.String, int, org.apache.commons.httpclient.protocol.Protocol)"><!-- --></A><H3>
HttpConnection</H3>
<PRE>
public <B>HttpConnection</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> proxyHost,
int proxyPort,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
int port,
<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</PRE>
<DL>
<DD>Creates a new HTTP connection for the given host with the virtual
alias and port via the given proxy host and port using the given
protocol.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>proxyHost</CODE> - the host to proxy via<DD><CODE>proxyPort</CODE> - the port to proxy via<DD><CODE>host</CODE> - the host to connect to. Parameter value must be non-null.<DD><CODE>port</CODE> - the port to connect to<DD><CODE>protocol</CODE> - The protocol to use. Parameter value must be non-null.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getSocket()"><!-- --></A><H3>
getSocket</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net">Socket</A> <B>getSocket</B>()</PRE>
<DL>
<DD>Returns the connection socket.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the socket.<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHost()"><!-- --></A><H3>
getHost</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getHost</B>()</PRE>
<DL>
<DD>Returns the host.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the host.</DL>
</DD>
</DL>
<HR>
<A NAME="setHost(java.lang.String)"><!-- --></A><H3>
setHost</H3>
<PRE>
public void <B>setHost</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Sets the host to connect to.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to connect to. Parameter value must be non-null.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="getVirtualHost()"><!-- --></A><H3>
getVirtualHost</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getVirtualHost</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>no longer applicable</I>
<P>
<DD>Returns the target virtual host.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the virtual host.</DL>
</DD>
</DL>
<HR>
<A NAME="setVirtualHost(java.lang.String)"><!-- --></A><H3>
setVirtualHost</H3>
<PRE>
public void <B>setVirtualHost</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>no longer applicable</I>
<P>
<DD>Sets the virtual host to target.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the virtual host name that should be used instead of
physical host name when sending HTTP requests. Virtual host
name can be set to <tt> null</tt> if virtual host name is not
to be used
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="getPort()"><!-- --></A><H3>
getPort</H3>
<PRE>
public int <B>getPort</B>()</PRE>
<DL>
<DD>Returns the port of the host.
If the port is -1 (or less than 0) the default port for
the current protocol is returned.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the port.</DL>
</DD>
</DL>
<HR>
<A NAME="setPort(int)"><!-- --></A><H3>
setPort</H3>
<PRE>
public void <B>setPort</B>(int port)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Sets the port to connect to.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>port</CODE> - the port to connect to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="getProxyHost()"><!-- --></A><H3>
getProxyHost</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getProxyHost</B>()</PRE>
<DL>
<DD>Returns the proxy host.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the proxy host.</DL>
</DD>
</DL>
<HR>
<A NAME="setProxyHost(java.lang.String)"><!-- --></A><H3>
setProxyHost</H3>
<PRE>
public void <B>setProxyHost</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Sets the host to proxy through.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to proxy through.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="getProxyPort()"><!-- --></A><H3>
getProxyPort</H3>
<PRE>
public int <B>getProxyPort</B>()</PRE>
<DL>
<DD>Returns the port of the proxy host.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the proxy port.</DL>
</DD>
</DL>
<HR>
<A NAME="setProxyPort(int)"><!-- --></A><H3>
setProxyPort</H3>
<PRE>
public void <B>setProxyPort</B>(int port)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Sets the port of the host to proxy through.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>port</CODE> - the port of the host to proxy through.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="isSecure()"><!-- --></A><H3>
isSecure</H3>
<PRE>
public boolean <B>isSecure</B>()</PRE>
<DL>
<DD>Returns <tt>true</tt> if the connection is established over
a secure protocol.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if connected over a secure protocol.</DL>
</DD>
</DL>
<HR>
<A NAME="getProtocol()"><!-- --></A><H3>
getProtocol</H3>
<PRE>
public <A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> <B>getProtocol</B>()</PRE>
<DL>
<DD>Returns the protocol used to establish the connection.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The protocol</DL>
</DD>
</DL>
<HR>
<A NAME="setProtocol(org.apache.commons.httpclient.protocol.Protocol)"><!-- --></A><H3>
setProtocol</H3>
<PRE>
public void <B>setProtocol</B>(<A HREF="../../../../org/apache/commons/httpclient/protocol/Protocol.html" title="class in org.apache.commons.httpclient.protocol">Protocol</A> protocol)</PRE>
<DL>
<DD>Sets the protocol used to establish the connection
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>protocol</CODE> - The protocol to use.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is already open</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalAddress()"><!-- --></A><H3>
getLocalAddress</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A> <B>getLocalAddress</B>()</PRE>
<DL>
<DD>Return the local address used when creating the connection.
If <tt>null</tt>, the default address is used.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>InetAddress the local address to be used when creating Sockets</DL>
</DD>
</DL>
<HR>
<A NAME="setLocalAddress(java.net.InetAddress)"><!-- --></A><H3>
setLocalAddress</H3>
<PRE>
public void <B>setLocalAddress</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html" title="class or interface in java.net">InetAddress</A> localAddress)</PRE>
<DL>
<DD>Set the local address used when creating the connection.
If unset or <tt>null</tt>, the default address is used.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>localAddress</CODE> - the local address to use</DL>
</DD>
</DL>
<HR>
<A NAME="isOpen()"><!-- --></A><H3>
isOpen</H3>
<PRE>
public boolean <B>isOpen</B>()</PRE>
<DL>
<DD>Tests if the connection is open.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the connection is open</DL>
</DD>
</DL>
<HR>
<A NAME="closeIfStale()"><!-- --></A><H3>
closeIfStale</H3>
<PRE>
public boolean <B>closeIfStale</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Closes the connection if stale.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if the connection was stale and therefore closed,
<code>false</code> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>Since:</B></DT>
<DD>3.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isStale()"><CODE>isStale()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isStaleCheckingEnabled()"><!-- --></A><H3>
isStaleCheckingEnabled</H3>
<PRE>
public boolean <B>isStaleCheckingEnabled</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#isStaleCheckingEnabled()"><CODE>HttpConnectionParams.isStaleCheckingEnabled()</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Tests if stale checking is enabled.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if enabled<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isStale()"><CODE>isStale()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setStaleCheckingEnabled(boolean)"><!-- --></A><H3>
setStaleCheckingEnabled</H3>
<PRE>
public void <B>setStaleCheckingEnabled</B>(boolean staleCheckEnabled)</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setStaleCheckingEnabled(boolean)"><CODE>HttpConnectionParams.setStaleCheckingEnabled(boolean)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Sets whether or not isStale() will be called when testing if this connection is open.
<p>Setting this flag to <code>false</code> will increase performance when reusing
connections, but it will also make them less reliable. Stale checking ensures that
connections are viable before they are used. When set to <code>false</code> some
method executions will result in IOExceptions and they will have to be retried.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>staleCheckEnabled</CODE> - <code>true</code> to enable isStale()<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isStale()"><CODE>isStale()</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#isOpen()"><CODE>isOpen()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="isStale()"><!-- --></A><H3>
isStale</H3>
<PRE>
protected boolean <B>isStale</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Determines whether this connection is "stale", which is to say that either
it is no longer open, or an attempt to read the connection would fail.
<p>Unfortunately, due to the limitations of the JREs prior to 1.4, it is
not possible to test a connection to see if both the read and write channels
are open - except by reading and writing. This leads to a difficulty when
some connections leave the "write" channel open, but close the read channel
and ignore the request. This function attempts to ameliorate that
problem by doing a test read, assuming that the caller will be doing a
write followed by a read, rather than the other way around.
</p>
<p>To avoid side-effects, the underlying connection is wrapped by a
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedInputStream.html" title="class or interface in java.io"><CODE>BufferedInputStream</CODE></A>, so although data might be read, what is visible
to clients of the connection will not change with this call.</p.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if the connection is already closed, or a read would
fail.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if the stale connection test is interrupted.</DL>
</DD>
</DL>
<HR>
<A NAME="isProxied()"><!-- --></A><H3>
isProxied</H3>
<PRE>
public boolean <B>isProxied</B>()</PRE>
<DL>
<DD>Returns <tt>true</tt> if the connection is established via a proxy,
<tt>false</tt> otherwise.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if a proxy is used to establish the connection,
<tt>false</tt> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setLastResponseInputStream(java.io.InputStream)"><!-- --></A><H3>
setLastResponseInputStream</H3>
<PRE>
public void <B>setLastResponseInputStream</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> inStream)</PRE>
<DL>
<DD>Set the state to keep track of the last response for the last request.
<p>The connection managers use this to ensure that previous requests are
properly closed before a new request is attempted. That way, a GET
request need not be read in its entirety before a new request is issued.
Instead, this stream can be closed as appropriate.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inStream</CODE> - The stream associated with an HttpMethod.</DL>
</DD>
</DL>
<HR>
<A NAME="getLastResponseInputStream()"><!-- --></A><H3>
getLastResponseInputStream</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>getLastResponseInputStream</B>()</PRE>
<DL>
<DD>Returns the stream used to read the last response's body.
<p>Clients will generally not need to call this function unless
using HttpConnection directly, instead of calling <A HREF="../../../../org/apache/commons/httpclient/HttpClient.html#executeMethod(org.apache.commons.httpclient.HttpMethod)"><CODE>HttpClient.executeMethod(org.apache.commons.httpclient.HttpMethod)</CODE></A>.
For those clients, call this function, and if it returns a non-null stream,
close the stream before attempting to execute a method. Note that
calling "close" on the stream returned by this function <i>may</i> close
the connection if the previous response contained a "Connection: close" header. </p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>An <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> corresponding to the body of the last
response.</DL>
</DD>
</DL>
<HR>
<A NAME="getParams()"><!-- --></A><H3>
getParams</H3>
<PRE>
public <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params">HttpConnectionParams</A> <B>getParams</B>()</PRE>
<DL>
<DD>Returns <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HTTP protocol parameters</CODE></A> associated with this method.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>HTTP parameters.<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setParams(org.apache.commons.httpclient.params.HttpConnectionParams)"><!-- --></A><H3>
setParams</H3>
<PRE>
public void <B>setParams</B>(<A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params">HttpConnectionParams</A> params)</PRE>
<DL>
<DD>Assigns <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HTTP protocol parameters</CODE></A> for this method.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>3.0</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HttpConnectionParams</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSoTimeout(int)"><!-- --></A><H3>
setSoTimeout</H3>
<PRE>
public void <B>setSoTimeout</B>(int timeout)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSoTimeout(int)"><CODE>HttpConnectionParams.setSoTimeout(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Set the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>Socket</CODE></A>'s timeout, via <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSoTimeout(int)" title="class or interface in java.net"><CODE>Socket.setSoTimeout(int)</CODE></A>. If the
connection is already open, the SO_TIMEOUT is changed. If no connection
is open, then subsequent connections will use the timeout value.
<p>
Note: This is not a connection timeout but a timeout on network traffic!
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></CODE> - - if there is an error in the underlying
protocol, such as a TCP error.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setSocketTimeout(int)"><!-- --></A><H3>
setSocketTimeout</H3>
<PRE>
public void <B>setSocketTimeout</B>(int timeout)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Sets <code>SO_TIMEOUT</code> value directly on the underlying <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>socket</CODE></A>.
This method does not change the default read timeout value set via
<A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html" title="class in org.apache.commons.httpclient.params"><CODE>HttpConnectionParams</CODE></A>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - the timeout value
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></CODE> - - if there is an error in the underlying
protocol, such as a TCP error.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not connected<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSoTimeout()"><!-- --></A><H3>
getSoTimeout</H3>
<PRE>
public int <B>getSoTimeout</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#getSoTimeout()"><CODE>HttpConnectionParams.getSoTimeout()</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Returns the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>Socket</CODE></A>'s timeout, via <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#getSoTimeout()" title="class or interface in java.net"><CODE>Socket.getSoTimeout()</CODE></A>, if the
connection is already open. If no connection is open, return the value subsequent
connection will use.
<p>
Note: This is not a connection timeout but a timeout on network traffic!
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the timeout value
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="setConnectionTimeout(int)"><!-- --></A><H3>
setConnectionTimeout</H3>
<PRE>
public void <B>setConnectionTimeout</B>(int timeout)</PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setConnectionTimeout(int)"><CODE>HttpConnectionParams.setConnectionTimeout(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Sets the connection timeout. This is the maximum time that may be spent
until a connection is established. The connection will fail after this
amount of time.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - The timeout in milliseconds. 0 means timeout is not used.</DL>
</DD>
</DL>
<HR>
<A NAME="open()"><!-- --></A><H3>
open</H3>
<PRE>
public void <B>open</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Establishes a connection to the specified host and port
(via a proxy if specified).
The underlying socket is created from the <A HREF="../../../../org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html" title="interface in org.apache.commons.httpclient.protocol"><CODE>ProtocolSocketFactory</CODE></A>.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an attempt to establish the connection results in an
I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="tunnelCreated()"><!-- --></A><H3>
tunnelCreated</H3>
<PRE>
public void <B>tunnelCreated</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Instructs the proxy to establish a secure tunnel to the host. The socket will
be switched to the secure socket. Subsequent communication is done via the secure
socket. The method can only be called once on a proxied secure connection.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if connection is not secure and proxied or
if the socket is already secure.
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an attempt to establish the secure tunnel results in an
I/O error.</DL>
</DD>
</DL>
<HR>
<A NAME="isTransparent()"><!-- --></A><H3>
isTransparent</H3>
<PRE>
public boolean <B>isTransparent</B>()</PRE>
<DL>
<DD>Indicates if the connection is completely transparent from end to end.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if conncetion is not proxied or tunneled through a transparent
proxy; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="flushRequestOutputStream()"><!-- --></A><H3>
flushRequestOutputStream</H3>
<PRE>
public void <B>flushRequestOutputStream</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Flushes the output request stream. This method should be called to
ensure that data written to the request OutputStream is sent to the server.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="getRequestOutputStream()"><!-- --></A><H3>
getRequestOutputStream</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> <B>getRequestOutputStream</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Returns an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html" title="class or interface in java.io"><CODE>OutputStream</CODE></A> suitable for writing the request.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a stream to write the request to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="getResponseInputStream()"><!-- --></A><H3>
getResponseInputStream</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>getResponseInputStream</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Return a <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> suitable for reading the response.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>InputStream The response input stream.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an IO problem occurs
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the connection isn't open.</DL>
</DD>
</DL>
<HR>
<A NAME="isResponseAvailable()"><!-- --></A><H3>
isResponseAvailable</H3>
<PRE>
public boolean <B>isResponseAvailable</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Tests if input data avaialble. This method returns immediately
and does not perform any read operations on the input socket
<P>
<DD><DL>
<DT><B>Returns:</B><DD>boolean <tt>true</tt> if input data is available,
<tt>false</tt> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an IO problem occurs
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the connection isn't open.</DL>
</DD>
</DL>
<HR>
<A NAME="isResponseAvailable(int)"><!-- --></A><H3>
isResponseAvailable</H3>
<PRE>
public boolean <B>isResponseAvailable</B>(int timeout)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE>
<DL>
<DD>Tests if input data becomes available within the given period time in milliseconds.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - The number milliseconds to wait for input data to become available
<DT><B>Returns:</B><DD>boolean <tt>true</tt> if input data is availble,
<tt>false</tt> otherwise.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an IO problem occurs
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - If the connection isn't open.</DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[])"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[] data)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes the specified bytes to the output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not connected
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#write(byte[], int, int)"><CODE>write(byte[],int,int)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="write(byte[], int, int)"><!-- --></A><H3>
write</H3>
<PRE>
public void <B>write</B>(byte[] data,
int offset,
int length)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes <i>length</i> bytes in <i>data</i> starting at
<i>offset</i> to the output stream.
The general contract for
write(b, off, len) is that some of the bytes in the array b are written
to the output stream in order; element b[off] is the first byte written
and b[off+len-1] is the last byte written by this operation.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - array containing the data to be written.<DD><CODE>offset</CODE> - the start offset in the data.<DD><CODE>length</CODE> - the number of bytes to write.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not connected
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="writeLine(byte[])"><!-- --></A><H3>
writeLine</H3>
<PRE>
public void <B>writeLine</B>(byte[] data)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes the specified bytes, followed by <tt>"\r\n".getBytes()</tt> to the
output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the bytes to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="writeLine()"><!-- --></A><H3>
writeLine</H3>
<PRE>
public void <B>writeLine</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes <tt>"\r\n".getBytes()</tt> to the output stream.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="print(java.lang.String)"><!-- --></A><H3>
print</H3>
<PRE>
public void <B>print</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#print(java.lang.String, java.lang.String)"><CODE>print(String, String)</CODE></A>
Writes the specified String (as bytes) to the output stream.</I>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the string to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="print(java.lang.String, java.lang.String)"><!-- --></A><H3>
print</H3>
<PRE>
public void <B>print</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes the specified String (as bytes) to the output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the string to be written<DD><CODE>charset</CODE> - the charset to use for writing the data
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="printLine(java.lang.String)"><!-- --></A><H3>
printLine</H3>
<PRE>
public void <B>printLine</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#printLine(java.lang.String, java.lang.String)"><CODE>printLine(String, String)</CODE></A>
Writes the specified String (as bytes), followed by
<tt>"\r\n".getBytes()</tt> to the output stream.</I>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to be written
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="printLine(java.lang.String, java.lang.String)"><!-- --></A><H3>
printLine</H3>
<PRE>
public void <B>printLine</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> data,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes the specified String (as bytes), followed by
<tt>"\r\n".getBytes()</tt> to the output stream.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to be written<DD><CODE>charset</CODE> - the charset to use for writing the data
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="printLine()"><!-- --></A><H3>
printLine</H3>
<PRE>
public void <B>printLine</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Writes <tt>"\r\n".getBytes()</tt> to the output stream.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readLine()"><!-- --></A><H3>
readLine</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>readLine</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>use #readLine(String)</I>
<P>
<DD>Reads up to <tt>"\n"</tt> from the (unchunked) input stream.
If the stream ends before the line terminator is found,
the last part of the string will still be returned.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a line from the response
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs</DL>
</DD>
</DL>
<HR>
<A NAME="readLine(java.lang.String)"><!-- --></A><H3>
readLine</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>readLine</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Reads up to <tt>"\n"</tt> from the (unchunked) input stream.
If the stream ends before the line terminator is found,
the last part of the string will still be returned.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>charset</CODE> - the charset to use for reading the data
<DT><B>Returns:</B><DD>a line from the response
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the connection is not open
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an I/O problem occurs<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="shutdownOutput()"><!-- --></A><H3>
shutdownOutput</H3>
<PRE>
public void <B>shutdownOutput</B>()</PRE>
<DL>
<DD><B>Deprecated.</B> <I>unused</I>
<P>
<DD>Attempts to shutdown the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html" title="class or interface in java.net"><CODE>Socket</CODE></A>'s output, via Socket.shutdownOutput()
when running on JVM 1.3 or higher.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="close()"><!-- --></A><H3>
close</H3>
<PRE>
public void <B>close</B>()</PRE>
<DL>
<DD>Closes the socket and streams.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHttpConnectionManager()"><!-- --></A><H3>
getHttpConnectionManager</H3>
<PRE>
public <A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient">HttpConnectionManager</A> <B>getHttpConnectionManager</B>()</PRE>
<DL>
<DD>Returns the httpConnectionManager.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>HttpConnectionManager</DL>
</DD>
</DL>
<HR>
<A NAME="setHttpConnectionManager(org.apache.commons.httpclient.HttpConnectionManager)"><!-- --></A><H3>
setHttpConnectionManager</H3>
<PRE>
public void <B>setHttpConnectionManager</B>(<A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient">HttpConnectionManager</A> httpConnectionManager)</PRE>
<DL>
<DD>Sets the httpConnectionManager.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>httpConnectionManager</CODE> - The httpConnectionManager to set</DL>
</DD>
</DL>
<HR>
<A NAME="releaseConnection()"><!-- --></A><H3>
releaseConnection</H3>
<PRE>
public void <B>releaseConnection</B>()</PRE>
<DL>
<DD>Releases the connection. If the connection is locked or does not have a connection
manager associated with it, this method has no effect. Note that it is completely safe
to call this method multiple times.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isLocked()"><!-- --></A><H3>
isLocked</H3>
<PRE>
protected boolean <B>isLocked</B>()</PRE>
<DL>
<DD>Tests if the connection is locked. Locked connections cannot be released.
An attempt to release a locked connection will have no effect.
<P>
<DD><DL>
<DT><B>Returns:</B><DD><tt>true</tt> if the connection is locked, <tt>false</tt> otherwise.<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setLocked(boolean)"><!-- --></A><H3>
setLocked</H3>
<PRE>
protected void <B>setLocked</B>(boolean locked)</PRE>
<DL>
<DD>Locks or unlocks the connection. Locked connections cannot be released.
An attempt to release a locked connection will have no effect.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>locked</CODE> - <tt>true</tt> to lock the connection, <tt>false</tt> to unlock
the connection.<DT><B>Since:</B></DT>
<DD>3.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="closeSocketAndStreams()"><!-- --></A><H3>
closeSocketAndStreams</H3>
<PRE>
protected void <B>closeSocketAndStreams</B>()</PRE>
<DL>
<DD>Closes everything out.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="assertNotOpen()"><!-- --></A><H3>
assertNotOpen</H3>
<PRE>
protected void <B>assertNotOpen</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Throws an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> if the connection is already open.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if connected</DL>
</DD>
</DL>
<HR>
<A NAME="assertOpen()"><!-- --></A><H3>
assertOpen</H3>
<PRE>
protected void <B>assertOpen</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></PRE>
<DL>
<DD>Throws an <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> if the connection is not open.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not connected</DL>
</DD>
</DL>
<HR>
<A NAME="getSendBufferSize()"><!-- --></A><H3>
getSendBufferSize</H3>
<PRE>
public int <B>getSendBufferSize</B>()
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD>Gets the socket's sendBufferSize.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the size of the buffer for the socket OutputStream, -1 if the value
has not been set and the socket has not been opened
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></CODE> - if an error occurs while getting the socket value<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#getSendBufferSize()" title="class or interface in java.net"><CODE>Socket.getSendBufferSize()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setSendBufferSize(int)"><!-- --></A><H3>
setSendBufferSize</H3>
<PRE>
public void <B>setSendBufferSize</B>(int sendBufferSize)
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></PRE>
<DL>
<DD><B>Deprecated.</B> <I>Use <A HREF="../../../../org/apache/commons/httpclient/params/HttpConnectionParams.html#setSendBufferSize(int)"><CODE>HttpConnectionParams.setSendBufferSize(int)</CODE></A>,
<A HREF="../../../../org/apache/commons/httpclient/HttpConnection.html#getParams()"><CODE>getParams()</CODE></A>.</I>
<P>
<DD>Sets the socket's sendBufferSize.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sendBufferSize</CODE> - the size to set for the socket OutputStream
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/SocketException.html" title="class or interface in java.net">SocketException</A></CODE> - if an error occurs while setting the socket value<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setSendBufferSize(int)" title="class or interface in java.net"><CODE>Socket.setSendBufferSize(int)</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<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/HttpConnection.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-all.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/commons/httpclient/HttpClientError.html" title="class in org.apache.commons.httpclient"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/commons/httpclient/HttpConnectionManager.html" title="interface in org.apache.commons.httpclient"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/commons/httpclient/HttpConnection.html" target="_top"><B>FRAMES</B></A>
<A HREF="HttpConnection.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
|