Java Doc for httpc.java in  » Search-Engine » yacy » de » anomic » http » 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 » Search Engine » yacy » de.anomic.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.anomic.http.httpc

httpc
final public class httpc (Code)
This class implements an http client. While http access is built-in in java libraries, it is still necessary to implement the network interface since otherwise there is no access to the HTTP/1.0 / HTTP/1.1 header information that comes along each connection.

Inner Class :public static class connectionTimeComparator implements Comparator<httpc>
Inner Class :final public class response

Field Summary
final public static  StringGZIP_POST_BODY
    
public  Stringadressed_host
    
public  intadressed_port
    
public  Stringcommand
    
final public static  connectionTimeComparatorconnectionTimeComparatorInstance
    
public  longinitTimelastIO
    
public  booleanssl
    
public static  StringsystemOST
    
public  inttimeout
    
public static  StringuserAgent
    
public static  booleanyacyDebugMode
    

Constructor Summary
public  httpc(String server, String vhost, int port, int timeout, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, String incomingByteCountAccounting, String outgoingByteCountAccounting)
     Initialize the httpc-instance with the given data.

Method Summary
public  responseCONNECT(String remotehost, int remoteport, httpHeader requestHeader)
     Call the server with the CONNECT-method. This is used to establish https-connections through a https-proxy
Parameters:
  host - To which host should a connection be made?
Parameters:
  port - Which port should be connected?
Parameters:
  requestHeader - prefilled httpHeader.
public  responseGET(String path, httpHeader requestHeader)
     This method GETs a page from the server.
Parameters:
  path - The path to the page which should be GET.
Parameters:
  requestHeader - Prefilled httpHeader.
public  responseHEAD(String path, httpHeader requestHeader)
     This method gets only the header of a page.
Parameters:
  path - The path to the page whose header should be get.
Parameters:
  requestHeader - Prefilled httpHeader.
public  responsePOST(String path, httpHeader requestHeader, InputStream ins)
     This method POSTs some data to a page.
Parameters:
  path - The path to the page which the post is sent to.
Parameters:
  requestHeader - Prefilled httpHeader.
Parameters:
  ins - InputStream with the data to be posted to the server.
public  responsePOST(String path, httpHeader requestHeader, serverObjects args, HashMap<String, byte[]> files)
     This method sends several files at once via a POST request.
public static  httpc[]allConnections()
    
public static  intcheckIdleConnections()
    
public  voidclose()
    
public static  intcloseAllConnections()
    
public static  StringdateString(Date date)
     Returns the given date in an HTTP-usable format. (according to RFC822)
Parameters:
  date - The Date-Object to be converted.
public  voidfinalize()
    
public  longgetInputStreamByteCount()
    
public  longgetOutputStreamByteCount()
    
public  inthashCode()
    
public  booleanisClosed()
     Check wether the connection of this instance is closed.
public static  Map<String, String>loadHashMap(yacyURL url, httpRemoteProxyConfig proxy)
    
public static  voidmain(String[] args)
    
public static  DatenowDate()
     Returns the current date as Date-Object.
public  voidsetAllowContentEncoding(boolean status)
    
public static  byte[]singleGET(String realhost, String virtualhost, int port, String path, int timeout, String user, String password, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, File download)
    
public static  byte[]singleGET(yacyURL u, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, File download)
    
public static  byte[]singlePOST(String realhost, String virtualhost, int port, String path, int timeout, String user, String password, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, serverObjects props, HashMap<String, byte[]> files)
    
public static  byte[]singlePOST(yacyURL u, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, serverObjects props, HashMap<String, byte[]> files)
    
public  StringtoString()
     Convert the status of this class into an String object to output it.
public static  byte[]wget(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, File download)
    
public static  httpHeaderwhead(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig)
    
public static  httpHeaderwhead(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader)
    
public static  byte[]wput(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, serverObjects props, HashMap<String, byte[]> files)
    

Field Detail
GZIP_POST_BODY
final public static String GZIP_POST_BODY(Code)
Specifies that the httpc is allowed to use gzip content encoding for http post requests
See Also:   httpc.POST(String,httpHeader,serverObjects,HashMap)



adressed_host
public String adressed_host(Code)



adressed_port
public int adressed_port(Code)



command
public String command(Code)



connectionTimeComparatorInstance
final public static connectionTimeComparator connectionTimeComparatorInstance(Code)



initTimelastIO
public long initTimelastIO(Code)



ssl
public boolean ssl(Code)



systemOST
public static String systemOST(Code)



timeout
public int timeout(Code)



userAgent
public static String userAgent(Code)



yacyDebugMode
public static boolean yacyDebugMode(Code)




Constructor Detail
httpc
public httpc(String server, String vhost, int port, int timeout, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, String incomingByteCountAccounting, String outgoingByteCountAccounting) throws IOException(Code)
Initialize the httpc-instance with the given data.
Parameters:
  remoteProxyHost -
Parameters:
  remoteProxyPort -
throws:
  IOException -




Method Detail
CONNECT
public response CONNECT(String remotehost, int remoteport, httpHeader requestHeader) throws IOException(Code)
Call the server with the CONNECT-method. This is used to establish https-connections through a https-proxy
Parameters:
  host - To which host should a connection be made?
Parameters:
  port - Which port should be connected?
Parameters:
  requestHeader - prefilled httpHeader. Instance of response with the content.



GET
public response GET(String path, httpHeader requestHeader) throws IOException(Code)
This method GETs a page from the server.
Parameters:
  path - The path to the page which should be GET.
Parameters:
  requestHeader - Prefilled httpHeader. Instance of response with the content.
throws:
  IOException -



HEAD
public response HEAD(String path, httpHeader requestHeader) throws IOException(Code)
This method gets only the header of a page.
Parameters:
  path - The path to the page whose header should be get.
Parameters:
  requestHeader - Prefilled httpHeader. Instance of response with the content.
throws:
  IOException -



POST
public response POST(String path, httpHeader requestHeader, InputStream ins) throws IOException(Code)
This method POSTs some data to a page.
Parameters:
  path - The path to the page which the post is sent to.
Parameters:
  requestHeader - Prefilled httpHeader.
Parameters:
  ins - InputStream with the data to be posted to the server. Instance of response with the content.
throws:
  IOException -



POST
public response POST(String path, httpHeader requestHeader, serverObjects args, HashMap<String, byte[]> files) throws IOException(Code)
This method sends several files at once via a POST request. Only those files in the Hashtable files are written whose names are contained in args.
Parameters:
  path - The path to the page which the post is sent to.
Parameters:
  requestHeader - Prefilled httpHeader.
Parameters:
  args - serverObjects with the names of the files to send.
Parameters:
  files - HashMap with the names of the files as key and the contentof the files as value. Instance of response with the content.
throws:
  IOException -



allConnections
public static httpc[] allConnections()(Code)



checkIdleConnections
public static int checkIdleConnections()(Code)



close
public void close()(Code)



closeAllConnections
public static int closeAllConnections()(Code)



dateString
public static String dateString(Date date)(Code)
Returns the given date in an HTTP-usable format. (according to RFC822)
Parameters:
  date - The Date-Object to be converted. String with the date.



finalize
public void finalize()(Code)



getInputStreamByteCount
public long getInputStreamByteCount()(Code)



getOutputStreamByteCount
public long getOutputStreamByteCount()(Code)



hashCode
public int hashCode()(Code)



isClosed
public boolean isClosed()(Code)
Check wether the connection of this instance is closed. true if the connection is no longer open.



loadHashMap
public static Map<String, String> loadHashMap(yacyURL url, httpRemoteProxyConfig proxy)(Code)



main
public static void main(String[] args)(Code)



nowDate
public static Date nowDate()(Code)
Returns the current date as Date-Object. Date-object with the current time.



setAllowContentEncoding
public void setAllowContentEncoding(boolean status)(Code)
Sets wether the content is allowed to be unzipped while getting? FIXME: The name of this method seems misleading, if I read the usage of this method correctly?
Parameters:
  status - true, if the content is allowed to be decoded on the fly?



singleGET
public static byte[] singleGET(String realhost, String virtualhost, int port, String path, int timeout, String user, String password, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, File download) throws IOException(Code)



singleGET
public static byte[] singleGET(yacyURL u, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, File download) throws IOException(Code)



singlePOST
public static byte[] singlePOST(String realhost, String virtualhost, int port, String path, int timeout, String user, String password, boolean ssl, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, serverObjects props, HashMap<String, byte[]> files) throws IOException(Code)



singlePOST
public static byte[] singlePOST(yacyURL u, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, serverObjects props, HashMap<String, byte[]> files) throws IOException(Code)



toString
public String toString()(Code)
Convert the status of this class into an String object to output it.



wget
public static byte[] wget(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader, File download) throws IOException(Code)



whead
public static httpHeader whead(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig) throws IOException(Code)



whead
public static httpHeader whead(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, httpHeader requestHeader) throws IOException(Code)



wput
public static byte[] wput(yacyURL url, String vhost, int timeout, String user, String password, httpRemoteProxyConfig theRemoteProxyConfig, serverObjects props, HashMap<String, byte[]> files) throws IOException(Code)



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.