|
||||||||||
| 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 java.lang.String |
escapeHtml(java.lang.String pText)
Replaces special characters with escape characters, valid for html. |
static java.io.InputStream |
get(java.lang.String pURL)
Sends a get request. |
static java.io.InputStream |
get(java.lang.String pURL,
java.io.File pFile)
Sends a get request with given file. |
static java.io.InputStream |
get(java.lang.String pURL,
java.io.InputStream pStream)
Sends a get request with content. |
static java.io.InputStream |
get(java.lang.String pURL,
java.io.InputStream pStream,
java.util.Map<java.lang.String,java.lang.String> pProperties)
Sends a get request with content. |
static java.io.InputStream |
get(java.lang.String pURL,
java.io.InputStream pStream,
java.util.Map<java.lang.String,java.lang.String> pProperties,
int pTimeout)
Sends a get request with content. |
static java.lang.String |
getETag(java.io.File pFile)
Gets the ETag http header value for the last modified of a file. |
static java.lang.String |
getLastModified(java.io.File pFile)
Gets the Last-Modified http header value for the last modified of a file. |
static java.io.InputStream |
post(java.lang.String pURL)
Sends an empty post request. |
static java.io.InputStream |
post(java.lang.String pURL,
java.io.File pFile)
Sends a post request with given file. |
static java.io.InputStream |
post(java.lang.String pURL,
java.io.InputStream pStream)
Sends a post request with given data. |
static java.io.InputStream |
post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName)
Sends a post request with given content. |
static java.io.InputStream |
post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName,
java.util.Map<java.lang.String,java.lang.String> pProperties)
Sends a post request with given content. |
static java.io.InputStream |
post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName,
java.util.Map<java.lang.String,java.lang.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 java.io.InputStream post(java.lang.String pURL)
throws java.lang.Exception
pURL - the URL
java.lang.Exception - if communication failed
public static java.io.InputStream post(java.lang.String pURL,
java.io.InputStream pStream)
throws java.lang.Exception
pURL - the URLpStream - the content to send
java.lang.Exception - if communication failed
public static java.io.InputStream post(java.lang.String pURL,
java.io.File pFile)
throws java.lang.Exception
pURL - the URLpFile - the file
java.lang.Exception - if communication failed
public static java.io.InputStream post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName)
throws java.lang.Exception
pURL - the URLpStream - the content to sendpFileName - the file name
java.lang.Exception - if communication failed
public static java.io.InputStream post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName,
java.util.Map<java.lang.String,java.lang.String> pProperties)
throws java.lang.Exception
pURL - the URLpStream - the content to sendpFileName - the file namepProperties - additional request properties
java.lang.Exception - if communication failed
public static java.io.InputStream post(java.lang.String pURL,
java.io.InputStream pStream,
java.lang.String pFileName,
java.util.Map<java.lang.String,java.lang.String> pProperties,
int pTimeout)
throws java.lang.Exception
pURL - the URLpStream - the content to sendpFileName - the file namepProperties - additional request propertiespTimeout - the connect and read timeout
java.lang.Exception - if communication failed
public static java.io.InputStream get(java.lang.String pURL)
throws java.lang.Exception
pURL - the URL
java.lang.Exception - if communication failed
public static java.io.InputStream get(java.lang.String pURL,
java.io.File pFile)
throws java.lang.Exception
pURL - the URLpFile - the file
java.lang.Exception - if communication failed
public static java.io.InputStream get(java.lang.String pURL,
java.io.InputStream pStream)
throws java.lang.Exception
pURL - the URLpStream - the content stream
java.lang.Exception - if communication failed
public static java.io.InputStream get(java.lang.String pURL,
java.io.InputStream pStream,
java.util.Map<java.lang.String,java.lang.String> pProperties)
throws java.lang.Exception
pURL - the URLpStream - the content streampProperties - additional request properties
java.lang.Exception - if communication failed
public static java.io.InputStream get(java.lang.String pURL,
java.io.InputStream pStream,
java.util.Map<java.lang.String,java.lang.String> pProperties,
int pTimeout)
throws java.lang.Exception
pURL - the URLpStream - the content streampProperties - additional request propertiespTimeout - the connect and read timeout
java.lang.Exception - if communication failedpublic static java.lang.String escapeHtml(java.lang.String pText)
pText - the text
public static java.lang.String getETag(java.io.File pFile)
pFile - the requested file
public static java.lang.String getLastModified(java.io.File pFile)
pFile - the requested file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||