oemware.core.util
Class HttpUtils

java.lang.Object
  extended by oemware.core.util.HttpUtils

public final class HttpUtils
extends java.lang.Object

The http utils.


Constructor Summary
HttpUtils()
           
 
Method Summary
static byte[] readContent(java.lang.String pUrl, int pConnectTimeout, int pReadTimeout, java.lang.String pUserAgent, int pReadBufferSize, int pRemoteReadBlockSize)
          Opens an http connection and tries to read the contents.
static byte[] readPageContent(java.lang.String pUrl)
          Opens an http connection and tries to read the page content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

readPageContent

public static final byte[] readPageContent(java.lang.String pUrl)
                                    throws java.io.IOException
Opens an http connection and tries to read the page content. This has a fixed buffer set to PAGE_READ_BUFFER_SIZE.

Parameters:
pUrl - The url.
Returns:
The content string.
Throws:
java.io.IOException

readContent

public static final byte[] readContent(java.lang.String pUrl,
                                       int pConnectTimeout,
                                       int pReadTimeout,
                                       java.lang.String pUserAgent,
                                       int pReadBufferSize,
                                       int pRemoteReadBlockSize)
                                throws java.io.IOException
Opens an http connection and tries to read the contents.

Parameters:
pUrl - The url.
pConnectTimeout - The connection timeout.
pReadTimeout - The read timeout.
pUserAgent - The user agent.
Returns:
The content.
Throws:
java.io.IOException


Copyright © 2009 Deft Labs - Released under LGPL, Version 3.0