Modifier and Type | Field and Description |
---|---|
static short |
ACTION_GET
Field
ACTION_GET |
static short |
ACTION_POST
Field
ACTION_POST |
static int |
MAX_REDIRECT |
static int |
STATUS_OK
Field
STATUS_OK |
Constructor and Description |
---|
HTTPUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
encode(String relpath) |
static URL |
encodeURL(URL url) |
static URL |
encodeURL(URL url,
int port) |
static String |
escapeQSValue(String str) |
static void |
forward(PageContext pc,
String relPath) |
static int |
getPort(URL url) |
static void |
include(PageContext pc,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse rsp,
String relPath) |
static void |
include(PageContext pc,
String relPath) |
static boolean |
isSecure(URL url) |
static boolean |
isTextMimeType(MimeType mimetype) |
static boolean |
isTextMimeType(String mimetype) |
static long |
length(URL url)
return the length of a file defined by a url.
|
static String |
optimizeRelPath(PageContext pc,
String relPath) |
static Map<String,String> |
parseParameterList(String _str,
boolean decode,
String charset) |
static String |
removeRef(String url) |
static URL |
removeRef(URL url) |
static javax.servlet.ServletRequest |
removeWrap(javax.servlet.ServletRequest req) |
static String[] |
splitMimeTypeAndCharset(String mimetype,
String[] defaultValue) |
static String[] |
splitTypeAndSubType(String mimetype) |
static ContentType |
toContentType(String str,
ContentType defaultValue) |
static URI |
toURI(String strUrl) |
static URI |
toURI(String strUrl,
int port) |
static URL |
toURL(String strUrl,
boolean encodeIfNecessary)
cast a string to a url
|
static URL |
toURL(String strUrl,
boolean encodeIfNecessary,
URL defaultValue) |
static URL |
toURL(String strUrl,
int port,
boolean encodeIfNecessary)
cast a string to a url
|
static String |
validateURL(String strUrl,
String defaultValue) |
public static final short ACTION_POST
ACTION_POST
public static final short ACTION_GET
ACTION_GET
public static final int STATUS_OK
STATUS_OK
public static final int MAX_REDIRECT
public HTTPUtil()
public static URL toURL(String strUrl, boolean encodeIfNecessary) throws MalformedURLException
strUrl
- string represent a urlMalformedURLException
public static String validateURL(String strUrl, String defaultValue)
public static URL toURL(String strUrl, int port, boolean encodeIfNecessary) throws MalformedURLException
strUrl
- string represent a urlMalformedURLException
public static URL encodeURL(URL url) throws MalformedURLException
MalformedURLException
public static URL encodeURL(URL url, int port) throws MalformedURLException
MalformedURLException
public static URI toURI(String strUrl) throws URISyntaxException
URISyntaxException
public static URI toURI(String strUrl, int port) throws URISyntaxException
URISyntaxException
public static String escapeQSValue(String str)
public static URL removeRef(URL url) throws MalformedURLException
MalformedURLException
public static String removeRef(String url) throws MalformedURLException
MalformedURLException
public static String optimizeRelPath(PageContext pc, String relPath)
public static void forward(PageContext pc, String relPath) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public static javax.servlet.ServletRequest removeWrap(javax.servlet.ServletRequest req)
public static void include(PageContext pc, String relPath) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public static void include(PageContext pc, javax.servlet.ServletRequest req, javax.servlet.ServletResponse rsp, String relPath) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public static long length(URL url) throws IOException
dataUrl
- IOException
public static Map<String,String> parseParameterList(String _str, boolean decode, String charset)
public static ContentType toContentType(String str, ContentType defaultValue)
public static String[] splitMimeTypeAndCharset(String mimetype, String[] defaultValue)
public static String[] splitTypeAndSubType(String mimetype)
public static boolean isTextMimeType(String mimetype)
public static boolean isTextMimeType(MimeType mimetype)
Copyright © 2015 Lucee