public class HttpUtil
extends java.lang.Object
コンストラクタと説明 |
---|
HttpUtil() |
修飾子とタイプ | メソッドと説明 |
---|---|
static void |
debug(java.lang.Object obj)
デバッグ出力用関数
|
static void |
download(javax.servlet.http.HttpServletResponse response,
java.io.File file) |
static boolean |
getFile(java.net.URL downloadUrl,
java.io.File saveFile)
指定されたURLからファイルを取得する
|
static java.net.HttpURLConnection |
httpProxy(java.lang.String url,
java.lang.String method,
java.lang.String contentType,
java.lang.String postData,
boolean useCaches)
HTTPリクエストをプロキシする。
|
static java.net.HttpURLConnection |
httpProxy(java.lang.String url,
java.lang.String method,
java.lang.String contentType,
java.lang.String postData,
boolean useCaches,
java.lang.String authorization)
HTTPリクエストをプロキシする。
|
static void |
throwBadRequestExceptionIfIsNull(java.lang.Object... args) |
static void |
throwMethodNotAllowdException() |
static void |
throwUnauthorizedException() |
public static java.net.HttpURLConnection httpProxy(java.lang.String url, java.lang.String method, java.lang.String contentType, java.lang.String postData, boolean useCaches) throws java.lang.Exception
url
- method
- contentType
- postData
- useCaches
- java.lang.Exception
public static java.net.HttpURLConnection httpProxy(java.lang.String url, java.lang.String method, java.lang.String contentType, java.lang.String postData, boolean useCaches, java.lang.String authorization) throws java.lang.Exception
url
- method
- contentType
- postData
- useCaches
- authorization
- : "Basic " + Base64したusername+":"+userpassjava.lang.Exception
public static void debug(java.lang.Object obj)
obj
- public static boolean getFile(java.net.URL downloadUrl, java.io.File saveFile) throws java.io.FileNotFoundException, java.io.IOException
downloadUrl
- saveFile
- java.io.FileNotFoundException
java.io.IOException
public static void download(javax.servlet.http.HttpServletResponse response, java.io.File file)
public static void throwUnauthorizedException()
public static void throwBadRequestExceptionIfIsNull(java.lang.Object... args)
public static void throwMethodNotAllowdException()