|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.type.HttpUtil
public final class HttpUtil
The HttpUtil is a utility class for http communication.
| Method Summary | |
|---|---|
static String |
escapeHtml(String pText)
Replaces special characters with escape characters, valid for html. |
static InputStream |
get(String pURL)
Sends a get request. |
static InputStream |
get(String pURL,
File pFile)
Sends a get request with given file. |
static InputStream |
get(String pURL,
InputStream pStream)
Sends a get request with content. |
static InputStream |
get(String pURL,
InputStream pStream,
Map<String,String> pProperties)
Sends a get request with content. |
static InputStream |
get(String pURL,
InputStream pStream,
Map<String,String> pProperties,
int pTimeout)
Sends a get request with content. |
static String |
getETag(File pFile)
Gets the ETag http header value for the last modified of a file. |
static String |
getLastModified(File pFile)
Gets the Last-Modified http header value for the last modified of a file. |
static InputStream |
post(String pURL)
Sends an empty post request. |
static InputStream |
post(String pURL,
File pFile)
Sends a post request with given file. |
static InputStream |
post(String pURL,
InputStream pStream)
Sends a post request with given data. |
static InputStream |
post(String pURL,
InputStream pStream,
String pFileName)
Sends a post request with given content. |
static InputStream |
post(String pURL,
InputStream pStream,
String pFileName,
Map<String,String> pProperties)
Sends a post request with given content. |
static InputStream |
post(String pURL,
InputStream pStream,
String pFileName,
Map<String,String> pProperties,
int pTimeout)
Sends a post request with given content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static InputStream post(String pURL)
throws Exception
pURL - the URL
Exception - if communication failed
public static InputStream post(String pURL,
InputStream pStream)
throws Exception
pURL - the URLpStream - the content to send
Exception - if communication failed
public static InputStream post(String pURL,
File pFile)
throws Exception
pURL - the URLpFile - the file
Exception - if communication failed
public static InputStream post(String pURL,
InputStream pStream,
String pFileName)
throws Exception
pURL - the URLpStream - the content to sendpFileName - the file name
Exception - if communication failed
public static InputStream post(String pURL,
InputStream pStream,
String pFileName,
Map<String,String> pProperties)
throws Exception
pURL - the URLpStream - the content to sendpFileName - the file namepProperties - additional request properties
Exception - if communication failed
public static InputStream post(String pURL,
InputStream pStream,
String pFileName,
Map<String,String> pProperties,
int pTimeout)
throws Exception
pURL - the URLpStream - the content to sendpFileName - the file namepProperties - additional request propertiespTimeout - the connect and read timeout
Exception - if communication failed
public static InputStream get(String pURL)
throws Exception
pURL - the URL
Exception - if communication failed
public static InputStream get(String pURL,
File pFile)
throws Exception
pURL - the URLpFile - the file
Exception - if communication failed
public static InputStream get(String pURL,
InputStream pStream)
throws Exception
pURL - the URLpStream - the content stream
Exception - if communication failed
public static InputStream get(String pURL,
InputStream pStream,
Map<String,String> pProperties)
throws Exception
pURL - the URLpStream - the content streampProperties - additional request properties
Exception - if communication failed
public static InputStream get(String pURL,
InputStream pStream,
Map<String,String> pProperties,
int pTimeout)
throws Exception
pURL - the URLpStream - the content streampProperties - additional request propertiespTimeout - the connect and read timeout
Exception - if communication failedpublic static String escapeHtml(String pText)
pText - the text
public static String getETag(File pFile)
pFile - the requested file
public static String getLastModified(File pFile)
pFile - the requested file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||