PageRenderTime 48ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/QingTingFanBianYi/src/org/apache/commons/httpclient/HttpConnection.java

https://gitlab.com/mrtoniliu/QingtingCheat
Java | 819 lines | 742 code | 73 blank | 4 comment | 86 complexity | 9a983a34f036f55fa7083dd8a9759329 MD5 | raw file
  1. package org.apache.commons.httpclient;
  2. import java.io.BufferedInputStream;
  3. import java.io.BufferedOutputStream;
  4. import java.io.IOException;
  5. import java.io.InputStream;
  6. import java.io.InterruptedIOException;
  7. import java.io.OutputStream;
  8. import java.lang.reflect.Method;
  9. import java.net.InetAddress;
  10. import java.net.Socket;
  11. import java.net.SocketException;
  12. import org.apache.commons.httpclient.params.HttpConnectionParams;
  13. import org.apache.commons.httpclient.protocol.Protocol;
  14. import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
  15. import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
  16. import org.apache.commons.httpclient.util.EncodingUtil;
  17. import org.apache.commons.httpclient.util.ExceptionUtil;
  18. import org.apache.commons.logging.Log;
  19. import org.apache.commons.logging.LogFactory;
  20. public class HttpConnection
  21. {
  22. private static final byte[] CRLF = { 13, 10 };
  23. private static final Log LOG;
  24. static Class class$org$apache$commons$httpclient$HttpConnection;
  25. private String hostName = null;
  26. private HttpConnectionManager httpConnectionManager;
  27. private InputStream inputStream = null;
  28. protected boolean isOpen = false;
  29. private InputStream lastResponseInputStream = null;
  30. private InetAddress localAddress;
  31. private boolean locked = false;
  32. private OutputStream outputStream = null;
  33. private HttpConnectionParams params = new HttpConnectionParams();
  34. private int portNumber = -1;
  35. private Protocol protocolInUse;
  36. private String proxyHostName = null;
  37. private int proxyPortNumber = -1;
  38. private Socket socket = null;
  39. private boolean tunnelEstablished = false;
  40. private boolean usingSecureSocket = false;
  41. static
  42. {
  43. Class localClass;
  44. if (class$org$apache$commons$httpclient$HttpConnection == null)
  45. {
  46. localClass = class$("org.apache.commons.httpclient.HttpConnection");
  47. class$org$apache$commons$httpclient$HttpConnection = localClass;
  48. }
  49. while (true)
  50. {
  51. LOG = LogFactory.getLog(localClass);
  52. return;
  53. localClass = class$org$apache$commons$httpclient$HttpConnection;
  54. }
  55. }
  56. public HttpConnection(String paramString, int paramInt)
  57. {
  58. this(null, -1, paramString, null, paramInt, Protocol.getProtocol("http"));
  59. }
  60. public HttpConnection(String paramString1, int paramInt1, String paramString2, int paramInt2)
  61. {
  62. this(paramString1, paramInt1, paramString2, null, paramInt2, Protocol.getProtocol("http"));
  63. }
  64. public HttpConnection(String paramString1, int paramInt1, String paramString2, int paramInt2, Protocol paramProtocol)
  65. {
  66. if (paramString2 == null)
  67. throw new IllegalArgumentException("host parameter is null");
  68. if (paramProtocol == null)
  69. throw new IllegalArgumentException("protocol is null");
  70. this.proxyHostName = paramString1;
  71. this.proxyPortNumber = paramInt1;
  72. this.hostName = paramString2;
  73. this.portNumber = paramProtocol.resolvePort(paramInt2);
  74. this.protocolInUse = paramProtocol;
  75. }
  76. public HttpConnection(String paramString1, int paramInt1, String paramString2, String paramString3, int paramInt2, Protocol paramProtocol)
  77. {
  78. this(paramString1, paramInt1, paramString2, paramInt2, paramProtocol);
  79. }
  80. public HttpConnection(String paramString, int paramInt, Protocol paramProtocol)
  81. {
  82. this(null, -1, paramString, null, paramInt, paramProtocol);
  83. }
  84. public HttpConnection(String paramString1, String paramString2, int paramInt, Protocol paramProtocol)
  85. {
  86. this(null, -1, paramString1, paramString2, paramInt, paramProtocol);
  87. }
  88. public HttpConnection(HostConfiguration paramHostConfiguration)
  89. {
  90. this(paramHostConfiguration.getProxyHost(), paramHostConfiguration.getProxyPort(), paramHostConfiguration.getHost(), paramHostConfiguration.getPort(), paramHostConfiguration.getProtocol());
  91. this.localAddress = paramHostConfiguration.getLocalAddress();
  92. }
  93. static Class class$(String paramString)
  94. {
  95. try
  96. {
  97. paramString = Class.forName(paramString);
  98. return paramString;
  99. }
  100. catch (ClassNotFoundException paramString)
  101. {
  102. }
  103. throw new NoClassDefFoundError(paramString.getMessage());
  104. }
  105. protected void assertNotOpen()
  106. throws IllegalStateException
  107. {
  108. if (this.isOpen)
  109. throw new IllegalStateException("Connection is open");
  110. }
  111. protected void assertOpen()
  112. throws IllegalStateException
  113. {
  114. if (!this.isOpen)
  115. throw new IllegalStateException("Connection is not open");
  116. }
  117. public void close()
  118. {
  119. LOG.trace("enter HttpConnection.close()");
  120. closeSocketAndStreams();
  121. }
  122. public boolean closeIfStale()
  123. throws IOException
  124. {
  125. if ((this.isOpen) && (isStale()))
  126. {
  127. LOG.debug("Connection is stale, closing...");
  128. close();
  129. return true;
  130. }
  131. return false;
  132. }
  133. protected void closeSocketAndStreams()
  134. {
  135. LOG.trace("enter HttpConnection.closeSockedAndStreams()");
  136. this.isOpen = false;
  137. this.lastResponseInputStream = null;
  138. Object localObject;
  139. if (this.outputStream != null)
  140. {
  141. localObject = this.outputStream;
  142. this.outputStream = null;
  143. }
  144. try
  145. {
  146. ((OutputStream)localObject).close();
  147. if (this.inputStream != null)
  148. {
  149. localObject = this.inputStream;
  150. this.inputStream = null;
  151. }
  152. }
  153. catch (Exception localException2)
  154. {
  155. try
  156. {
  157. ((InputStream)localObject).close();
  158. if (this.socket != null)
  159. {
  160. localObject = this.socket;
  161. this.socket = null;
  162. }
  163. }
  164. catch (Exception localException2)
  165. {
  166. try
  167. {
  168. while (true)
  169. {
  170. ((Socket)localObject).close();
  171. this.tunnelEstablished = false;
  172. this.usingSecureSocket = false;
  173. return;
  174. localException1 = localException1;
  175. LOG.debug("Exception caught when closing output", localException1);
  176. }
  177. localException2 = localException2;
  178. LOG.debug("Exception caught when closing input", localException2);
  179. }
  180. catch (Exception localException3)
  181. {
  182. while (true)
  183. LOG.debug("Exception caught when closing socket", localException3);
  184. }
  185. }
  186. }
  187. }
  188. public void flushRequestOutputStream()
  189. throws IOException
  190. {
  191. LOG.trace("enter HttpConnection.flushRequestOutputStream()");
  192. assertOpen();
  193. this.outputStream.flush();
  194. }
  195. public String getHost()
  196. {
  197. return this.hostName;
  198. }
  199. public HttpConnectionManager getHttpConnectionManager()
  200. {
  201. return this.httpConnectionManager;
  202. }
  203. public InputStream getLastResponseInputStream()
  204. {
  205. return this.lastResponseInputStream;
  206. }
  207. public InetAddress getLocalAddress()
  208. {
  209. return this.localAddress;
  210. }
  211. public HttpConnectionParams getParams()
  212. {
  213. return this.params;
  214. }
  215. public int getPort()
  216. {
  217. if (this.portNumber < 0)
  218. {
  219. if (isSecure())
  220. return 443;
  221. return 80;
  222. }
  223. return this.portNumber;
  224. }
  225. public Protocol getProtocol()
  226. {
  227. return this.protocolInUse;
  228. }
  229. public String getProxyHost()
  230. {
  231. return this.proxyHostName;
  232. }
  233. public int getProxyPort()
  234. {
  235. return this.proxyPortNumber;
  236. }
  237. public OutputStream getRequestOutputStream()
  238. throws IOException, IllegalStateException
  239. {
  240. LOG.trace("enter HttpConnection.getRequestOutputStream()");
  241. assertOpen();
  242. OutputStream localOutputStream = this.outputStream;
  243. Object localObject = localOutputStream;
  244. if (Wire.CONTENT_WIRE.enabled())
  245. localObject = new WireLogOutputStream(localOutputStream, Wire.CONTENT_WIRE);
  246. return localObject;
  247. }
  248. public InputStream getResponseInputStream()
  249. throws IOException, IllegalStateException
  250. {
  251. LOG.trace("enter HttpConnection.getResponseInputStream()");
  252. assertOpen();
  253. return this.inputStream;
  254. }
  255. public int getSendBufferSize()
  256. throws SocketException
  257. {
  258. if (this.socket == null)
  259. return -1;
  260. return this.socket.getSendBufferSize();
  261. }
  262. public int getSoTimeout()
  263. throws SocketException
  264. {
  265. return this.params.getSoTimeout();
  266. }
  267. protected Socket getSocket()
  268. {
  269. return this.socket;
  270. }
  271. public String getVirtualHost()
  272. {
  273. return this.hostName;
  274. }
  275. protected boolean isLocked()
  276. {
  277. return this.locked;
  278. }
  279. public boolean isOpen()
  280. {
  281. return this.isOpen;
  282. }
  283. public boolean isProxied()
  284. {
  285. return (this.proxyHostName != null) && (this.proxyPortNumber > 0);
  286. }
  287. public boolean isResponseAvailable()
  288. throws IOException
  289. {
  290. boolean bool2 = false;
  291. LOG.trace("enter HttpConnection.isResponseAvailable()");
  292. boolean bool1 = bool2;
  293. if (this.isOpen)
  294. {
  295. bool1 = bool2;
  296. if (this.inputStream.available() > 0)
  297. bool1 = true;
  298. }
  299. return bool1;
  300. }
  301. public boolean isResponseAvailable(int paramInt)
  302. throws IOException
  303. {
  304. LOG.trace("enter HttpConnection.isResponseAvailable(int)");
  305. assertOpen();
  306. boolean bool = false;
  307. if (this.inputStream.available() > 0)
  308. return true;
  309. while (true)
  310. {
  311. try
  312. {
  313. this.socket.setSoTimeout(paramInt);
  314. this.inputStream.mark(1);
  315. if (this.inputStream.read() != -1)
  316. {
  317. this.inputStream.reset();
  318. LOG.debug("Input data available");
  319. bool = true;
  320. try
  321. {
  322. this.socket.setSoTimeout(this.params.getSoTimeout());
  323. return bool;
  324. }
  325. catch (IOException localIOException1)
  326. {
  327. LOG.debug("An error ocurred while resetting soTimeout, we will assume that no response is available.", localIOException1);
  328. }
  329. return false;
  330. }
  331. LOG.debug("Input data not available");
  332. continue;
  333. }
  334. catch (InterruptedIOException localInterruptedIOException)
  335. {
  336. localInterruptedIOException = localInterruptedIOException;
  337. if (!ExceptionUtil.isSocketTimeoutException(localInterruptedIOException))
  338. throw localInterruptedIOException;
  339. }
  340. finally
  341. {
  342. }
  343. try
  344. {
  345. this.socket.setSoTimeout(this.params.getSoTimeout());
  346. throw localObject;
  347. if (LOG.isDebugEnabled())
  348. LOG.debug("Input data not available after " + paramInt + " ms");
  349. try
  350. {
  351. this.socket.setSoTimeout(this.params.getSoTimeout());
  352. return false;
  353. }
  354. catch (IOException localIOException2)
  355. {
  356. LOG.debug("An error ocurred while resetting soTimeout, we will assume that no response is available.", localIOException2);
  357. }
  358. }
  359. catch (IOException localIOException3)
  360. {
  361. while (true)
  362. LOG.debug("An error ocurred while resetting soTimeout, we will assume that no response is available.", localIOException3);
  363. }
  364. }
  365. }
  366. public boolean isSecure()
  367. {
  368. return this.protocolInUse.isSecure();
  369. }
  370. protected boolean isStale()
  371. throws IOException
  372. {
  373. boolean bool1 = true;
  374. boolean bool4;
  375. boolean bool3;
  376. boolean bool2;
  377. if (this.isOpen)
  378. {
  379. bool1 = false;
  380. bool4 = false;
  381. bool3 = false;
  382. bool2 = bool4;
  383. }
  384. try
  385. {
  386. int i = this.inputStream.available();
  387. if (i <= 0);
  388. try
  389. {
  390. this.socket.setSoTimeout(1);
  391. this.inputStream.mark(1);
  392. i = this.inputStream.read();
  393. if (i == -1);
  394. for (bool1 = true; ; bool1 = bool3)
  395. {
  396. bool2 = bool1;
  397. this.socket.setSoTimeout(this.params.getSoTimeout());
  398. return bool1;
  399. this.inputStream.reset();
  400. }
  401. }
  402. finally
  403. {
  404. bool2 = bool4;
  405. this.socket.setSoTimeout(this.params.getSoTimeout());
  406. bool2 = bool4;
  407. }
  408. }
  409. catch (InterruptedIOException localInterruptedIOException)
  410. {
  411. do
  412. bool1 = bool2;
  413. while (ExceptionUtil.isSocketTimeoutException(localInterruptedIOException));
  414. throw localInterruptedIOException;
  415. }
  416. catch (IOException localIOException)
  417. {
  418. LOG.debug("An error occurred while reading from the socket, is appears to be stale", localIOException);
  419. }
  420. return true;
  421. }
  422. public boolean isStaleCheckingEnabled()
  423. {
  424. return this.params.isStaleCheckingEnabled();
  425. }
  426. public boolean isTransparent()
  427. {
  428. return (!isProxied()) || (this.tunnelEstablished);
  429. }
  430. public void open()
  431. throws IOException
  432. {
  433. LOG.trace("enter HttpConnection.open()");
  434. Object localObject;
  435. int i;
  436. if (this.proxyHostName == null)
  437. {
  438. localObject = this.hostName;
  439. if (this.proxyHostName != null)
  440. break label371;
  441. i = this.portNumber;
  442. label35: assertNotOpen();
  443. if (LOG.isDebugEnabled())
  444. LOG.debug("Open connection to " + (String)localObject + ":" + i);
  445. }
  446. while (true)
  447. {
  448. try
  449. {
  450. if (this.socket == null)
  451. {
  452. if ((isSecure()) && (!isProxied()))
  453. {
  454. bool = true;
  455. this.usingSecureSocket = bool;
  456. if ((!isSecure()) || (!isProxied()))
  457. continue;
  458. localProtocolSocketFactory = Protocol.getProtocol("http").getSocketFactory();
  459. this.socket = localProtocolSocketFactory.createSocket((String)localObject, i, this.localAddress, 0, this.params);
  460. }
  461. }
  462. else
  463. {
  464. this.socket.setTcpNoDelay(this.params.getTcpNoDelay());
  465. this.socket.setSoTimeout(this.params.getSoTimeout());
  466. i = this.params.getLinger();
  467. if (i >= 0)
  468. {
  469. localObject = this.socket;
  470. if (i <= 0)
  471. continue;
  472. bool = true;
  473. ((Socket)localObject).setSoLinger(bool, i);
  474. }
  475. i = this.params.getSendBufferSize();
  476. if (i >= 0)
  477. this.socket.setSendBufferSize(i);
  478. i = this.params.getReceiveBufferSize();
  479. if (i >= 0)
  480. this.socket.setReceiveBufferSize(i);
  481. j = this.socket.getSendBufferSize();
  482. if (j > 2048)
  483. break label409;
  484. i = j;
  485. if (j <= 0)
  486. break label409;
  487. int k = this.socket.getReceiveBufferSize();
  488. if (k > 2048)
  489. break label416;
  490. j = k;
  491. if (k <= 0)
  492. break label416;
  493. this.inputStream = new BufferedInputStream(this.socket.getInputStream(), j);
  494. this.outputStream = new BufferedOutputStream(this.socket.getOutputStream(), i);
  495. this.isOpen = true;
  496. return;
  497. localObject = this.proxyHostName;
  498. break;
  499. label371: i = this.proxyPortNumber;
  500. break label35;
  501. }
  502. boolean bool = false;
  503. continue;
  504. ProtocolSocketFactory localProtocolSocketFactory = this.protocolInUse.getSocketFactory();
  505. continue;
  506. bool = false;
  507. continue;
  508. }
  509. catch (IOException localIOException)
  510. {
  511. closeSocketAndStreams();
  512. throw localIOException;
  513. }
  514. label409: i = 2048;
  515. continue;
  516. label416: int j = 2048;
  517. }
  518. }
  519. public void print(String paramString)
  520. throws IOException, IllegalStateException
  521. {
  522. LOG.trace("enter HttpConnection.print(String)");
  523. write(EncodingUtil.getBytes(paramString, "ISO-8859-1"));
  524. }
  525. public void print(String paramString1, String paramString2)
  526. throws IOException, IllegalStateException
  527. {
  528. LOG.trace("enter HttpConnection.print(String)");
  529. write(EncodingUtil.getBytes(paramString1, paramString2));
  530. }
  531. public void printLine()
  532. throws IOException, IllegalStateException
  533. {
  534. LOG.trace("enter HttpConnection.printLine()");
  535. writeLine();
  536. }
  537. public void printLine(String paramString)
  538. throws IOException, IllegalStateException
  539. {
  540. LOG.trace("enter HttpConnection.printLine(String)");
  541. writeLine(EncodingUtil.getBytes(paramString, "ISO-8859-1"));
  542. }
  543. public void printLine(String paramString1, String paramString2)
  544. throws IOException, IllegalStateException
  545. {
  546. LOG.trace("enter HttpConnection.printLine(String)");
  547. writeLine(EncodingUtil.getBytes(paramString1, paramString2));
  548. }
  549. public String readLine()
  550. throws IOException, IllegalStateException
  551. {
  552. LOG.trace("enter HttpConnection.readLine()");
  553. assertOpen();
  554. return HttpParser.readLine(this.inputStream);
  555. }
  556. public String readLine(String paramString)
  557. throws IOException, IllegalStateException
  558. {
  559. LOG.trace("enter HttpConnection.readLine()");
  560. assertOpen();
  561. return HttpParser.readLine(this.inputStream, paramString);
  562. }
  563. public void releaseConnection()
  564. {
  565. LOG.trace("enter HttpConnection.releaseConnection()");
  566. if (this.locked)
  567. {
  568. LOG.debug("Connection is locked. Call to releaseConnection() ignored.");
  569. return;
  570. }
  571. if (this.httpConnectionManager != null)
  572. {
  573. LOG.debug("Releasing connection back to connection manager.");
  574. this.httpConnectionManager.releaseConnection(this);
  575. return;
  576. }
  577. LOG.warn("HttpConnectionManager is null. Connection cannot be released.");
  578. }
  579. public void setConnectionTimeout(int paramInt)
  580. {
  581. this.params.setConnectionTimeout(paramInt);
  582. }
  583. public void setHost(String paramString)
  584. throws IllegalStateException
  585. {
  586. if (paramString == null)
  587. throw new IllegalArgumentException("host parameter is null");
  588. assertNotOpen();
  589. this.hostName = paramString;
  590. }
  591. public void setHttpConnectionManager(HttpConnectionManager paramHttpConnectionManager)
  592. {
  593. this.httpConnectionManager = paramHttpConnectionManager;
  594. }
  595. public void setLastResponseInputStream(InputStream paramInputStream)
  596. {
  597. this.lastResponseInputStream = paramInputStream;
  598. }
  599. public void setLocalAddress(InetAddress paramInetAddress)
  600. {
  601. assertNotOpen();
  602. this.localAddress = paramInetAddress;
  603. }
  604. protected void setLocked(boolean paramBoolean)
  605. {
  606. this.locked = paramBoolean;
  607. }
  608. public void setParams(HttpConnectionParams paramHttpConnectionParams)
  609. {
  610. if (paramHttpConnectionParams == null)
  611. throw new IllegalArgumentException("Parameters may not be null");
  612. this.params = paramHttpConnectionParams;
  613. }
  614. public void setPort(int paramInt)
  615. throws IllegalStateException
  616. {
  617. assertNotOpen();
  618. this.portNumber = paramInt;
  619. }
  620. public void setProtocol(Protocol paramProtocol)
  621. {
  622. assertNotOpen();
  623. if (paramProtocol == null)
  624. throw new IllegalArgumentException("protocol is null");
  625. this.protocolInUse = paramProtocol;
  626. }
  627. public void setProxyHost(String paramString)
  628. throws IllegalStateException
  629. {
  630. assertNotOpen();
  631. this.proxyHostName = paramString;
  632. }
  633. public void setProxyPort(int paramInt)
  634. throws IllegalStateException
  635. {
  636. assertNotOpen();
  637. this.proxyPortNumber = paramInt;
  638. }
  639. public void setSendBufferSize(int paramInt)
  640. throws SocketException
  641. {
  642. this.params.setSendBufferSize(paramInt);
  643. }
  644. public void setSoTimeout(int paramInt)
  645. throws SocketException, IllegalStateException
  646. {
  647. this.params.setSoTimeout(paramInt);
  648. if (this.socket != null)
  649. this.socket.setSoTimeout(paramInt);
  650. }
  651. public void setSocketTimeout(int paramInt)
  652. throws SocketException, IllegalStateException
  653. {
  654. assertOpen();
  655. if (this.socket != null)
  656. this.socket.setSoTimeout(paramInt);
  657. }
  658. public void setStaleCheckingEnabled(boolean paramBoolean)
  659. {
  660. this.params.setStaleCheckingEnabled(paramBoolean);
  661. }
  662. public void setVirtualHost(String paramString)
  663. throws IllegalStateException
  664. {
  665. assertNotOpen();
  666. }
  667. public void shutdownOutput()
  668. {
  669. LOG.trace("enter HttpConnection.shutdownOutput()");
  670. try
  671. {
  672. this.socket.getClass().getMethod("shutdownOutput", new Class[0]).invoke(this.socket, new Object[0]);
  673. return;
  674. }
  675. catch (Exception localException)
  676. {
  677. LOG.debug("Unexpected Exception caught", localException);
  678. }
  679. }
  680. public void tunnelCreated()
  681. throws IllegalStateException, IOException
  682. {
  683. LOG.trace("enter HttpConnection.tunnelCreated()");
  684. if ((!isSecure()) || (!isProxied()))
  685. throw new IllegalStateException("Connection must be secure and proxied to use this feature");
  686. if (this.usingSecureSocket)
  687. throw new IllegalStateException("Already using a secure socket");
  688. if (LOG.isDebugEnabled())
  689. LOG.debug("Secure tunnel to " + this.hostName + ":" + this.portNumber);
  690. this.socket = ((SecureProtocolSocketFactory)this.protocolInUse.getSocketFactory()).createSocket(this.socket, this.hostName, this.portNumber, true);
  691. int i = this.params.getSendBufferSize();
  692. if (i >= 0)
  693. this.socket.setSendBufferSize(i);
  694. i = this.params.getReceiveBufferSize();
  695. if (i >= 0)
  696. this.socket.setReceiveBufferSize(i);
  697. int j = this.socket.getSendBufferSize();
  698. i = j;
  699. if (j > 2048)
  700. i = 2048;
  701. int k = this.socket.getReceiveBufferSize();
  702. j = k;
  703. if (k > 2048)
  704. j = 2048;
  705. this.inputStream = new BufferedInputStream(this.socket.getInputStream(), j);
  706. this.outputStream = new BufferedOutputStream(this.socket.getOutputStream(), i);
  707. this.usingSecureSocket = true;
  708. this.tunnelEstablished = true;
  709. }
  710. public void write(byte[] paramArrayOfByte)
  711. throws IOException, IllegalStateException
  712. {
  713. LOG.trace("enter HttpConnection.write(byte[])");
  714. write(paramArrayOfByte, 0, paramArrayOfByte.length);
  715. }
  716. public void write(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
  717. throws IOException, IllegalStateException
  718. {
  719. LOG.trace("enter HttpConnection.write(byte[], int, int)");
  720. if (paramInt1 < 0)
  721. throw new IllegalArgumentException("Array offset may not be negative");
  722. if (paramInt2 < 0)
  723. throw new IllegalArgumentException("Array length may not be negative");
  724. if (paramInt1 + paramInt2 > paramArrayOfByte.length)
  725. throw new IllegalArgumentException("Given offset and length exceed the array length");
  726. assertOpen();
  727. this.outputStream.write(paramArrayOfByte, paramInt1, paramInt2);
  728. }
  729. public void writeLine()
  730. throws IOException, IllegalStateException
  731. {
  732. LOG.trace("enter HttpConnection.writeLine()");
  733. write(CRLF);
  734. }
  735. public void writeLine(byte[] paramArrayOfByte)
  736. throws IOException, IllegalStateException
  737. {
  738. LOG.trace("enter HttpConnection.writeLine(byte[])");
  739. write(paramArrayOfByte);
  740. writeLine();
  741. }
  742. }
  743. /* Location: C:\Users\User\dex2jar-2.0\dex\qting\classes-dex2jar.jar
  744. * Qualified Name: org.apache.commons.httpclient.HttpConnection
  745. * JD-Core Version: 0.6.2
  746. */