Java Doc for HttpClient.java in  » ERP-CRM-Financial » SourceTap-CRM » org » ofbiz » base » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » SourceTap CRM » org.ofbiz.base.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ofbiz.base.util.HttpClient

HttpClient
public class HttpClient (Code)
Send HTTP GET/POST requests.
author:
   Andy Zeneski
version:
   $Revision: 1.4 $
since:
   2.0


Field Summary
final public static  Stringmodule
    

Constructor Summary
public  HttpClient()
     Creates an empty HttpClient object.
public  HttpClient(URL url)
     Creates a new HttpClient object.
public  HttpClient(String url)
     Creates a new HttpClient object.
public  HttpClient(String url, Map parameters)
     Creates a new HttpClient object.
public  HttpClient(URL url, Map parameters)
     Creates a new HttpClient object.
public  HttpClient(String url, Map parameters, Map headers)
     Creates a new HttpClient object.
public  HttpClient(URL url, Map parameters, Map headers)
     Creates a new HttpClient object.

Method Summary
public  voidfollowRedirects(boolean followRedirects)
    
public  Stringget()
     Invoke HTTP request GET.
public  StringgetClientCertificateAlias()
     Returns the alias of the client certificate to be used for this SSL connection.
public  MapgetHeaders()
     Return a Map of headers.
public  MapgetParameters()
     Return a Map of parameters.
public  ObjectgetResponseContent()
     Returns the content of the response.
public  StringgetResponseContentEncoding()
     Returns the content encoding of the response.
public  intgetResponseContentLength()
    
public  StringgetResponseContentType()
     Returns the content-type of the response.
public  StringgetResponseHeader(String header)
     Returns the value of the specified named response header field.
public  StringgetResponseHeaderField(int n)
     Returns the value for the nth response header field.
public  StringgetResponseHeaderFieldKey(int n)
     Returns the key for the nth response header field.
public  InputStreamgetStream()
     Invoke HTTP request GET.
public  StringgetUrl()
     Return a string representing the requested URL.
public  Stringpost()
     Invoke HTTP request POST.
public  Stringpost(String stream)
     Invoke HTTP request POST and pass raw stream.
public  InputStreampostStream()
     Invoke HTTP request POST.
public  voidsetClientCertificateAlias(String alias)
     Sets the client certificate alias (from the keystore) to use for this SSL connection.
public  voidsetDebug(boolean debug)
    
public  voidsetHeader(String name, String value)
     Set an individual header for this request.
public  voidsetHeaders(Map headers)
     Set the headers for this request.
public  voidsetLineFeed(boolean lineFeed)
     Turns on or off line feeds in the request.
public  voidsetParameter(String name, String value)
     Set an individual parameter for this request.
public  voidsetParameters(Map parameters)
     Set the parameters for this request.
public  voidsetRawStream(String stream)
     Set the raw stream for posts.
public  voidsetTimeout(int timeout)
    
public  voidsetUrl(URL url)
     Set the URL for this request.
public  voidsetUrl(String url)
     Set the URL for this request.

Field Detail
module
final public static String module(Code)




Constructor Detail
HttpClient
public HttpClient()(Code)
Creates an empty HttpClient object.



HttpClient
public HttpClient(URL url)(Code)
Creates a new HttpClient object.



HttpClient
public HttpClient(String url)(Code)
Creates a new HttpClient object.



HttpClient
public HttpClient(String url, Map parameters)(Code)
Creates a new HttpClient object.



HttpClient
public HttpClient(URL url, Map parameters)(Code)
Creates a new HttpClient object.



HttpClient
public HttpClient(String url, Map parameters, Map headers)(Code)
Creates a new HttpClient object.



HttpClient
public HttpClient(URL url, Map parameters, Map headers)(Code)
Creates a new HttpClient object.




Method Detail
followRedirects
public void followRedirects(boolean followRedirects)(Code)
Enables this request to follow redirect 3xx codes (default true)



get
public String get() throws HttpClientException(Code)
Invoke HTTP request GET.



getClientCertificateAlias
public String getClientCertificateAlias()(Code)
Returns the alias of the client certificate to be used for this SSL connection.



getHeaders
public Map getHeaders()(Code)
Return a Map of headers.



getParameters
public Map getParameters()(Code)
Return a Map of parameters.



getResponseContent
public Object getResponseContent() throws java.io.IOException, HttpClientException(Code)
Returns the content of the response.



getResponseContentEncoding
public String getResponseContentEncoding() throws HttpClientException(Code)
Returns the content encoding of the response.



getResponseContentLength
public int getResponseContentLength() throws HttpClientException(Code)
Returns the content length of the response



getResponseContentType
public String getResponseContentType() throws HttpClientException(Code)
Returns the content-type of the response.



getResponseHeader
public String getResponseHeader(String header) throws HttpClientException(Code)
Returns the value of the specified named response header field.



getResponseHeaderField
public String getResponseHeaderField(int n) throws HttpClientException(Code)
Returns the value for the nth response header field. It returns null of there are fewer then n fields.



getResponseHeaderFieldKey
public String getResponseHeaderFieldKey(int n) throws HttpClientException(Code)
Returns the key for the nth response header field.



getStream
public InputStream getStream() throws HttpClientException(Code)
Invoke HTTP request GET.



getUrl
public String getUrl()(Code)
Return a string representing the requested URL.



post
public String post() throws HttpClientException(Code)
Invoke HTTP request POST.



post
public String post(String stream) throws HttpClientException(Code)
Invoke HTTP request POST and pass raw stream.



postStream
public InputStream postStream() throws HttpClientException(Code)
Invoke HTTP request POST.



setClientCertificateAlias
public void setClientCertificateAlias(String alias)(Code)
Sets the client certificate alias (from the keystore) to use for this SSL connection.



setDebug
public void setDebug(boolean debug)(Code)
When true overrides Debug.verboseOn() and forces debugging for this instance



setHeader
public void setHeader(String name, String value)(Code)
Set an individual header for this request.



setHeaders
public void setHeaders(Map headers)(Code)
Set the headers for this request.



setLineFeed
public void setLineFeed(boolean lineFeed)(Code)
Turns on or off line feeds in the request. (default is on)



setParameter
public void setParameter(String name, String value)(Code)
Set an individual parameter for this request.



setParameters
public void setParameters(Map parameters)(Code)
Set the parameters for this request.



setRawStream
public void setRawStream(String stream)(Code)
Set the raw stream for posts.



setTimeout
public void setTimeout(int timeout)(Code)
Sets the timeout for waiting for the connection (default 30sec)



setUrl
public void setUrl(URL url)(Code)
Set the URL for this request.



setUrl
public void setUrl(String url)(Code)
Set the URL for this request.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.