public class HttpUtil extends Object
| Constructor and Description |
|---|
HttpUtil() |
| Modifier and Type | Method and Description |
|---|---|
static DateFormat |
createGMTDateFormat() |
static Header |
createHeaders(String contentType,
String... headers) |
static Response |
createNotFoundResponse() |
static Response |
createResponse(int code,
String msg,
String body,
String contentType,
String... headers) |
static Response |
createSOAPValidationErrorResponse(String message) |
static String |
getHostName(String destination) |
static String |
getPathAndQueryString(String dest) |
static int |
getPort(String hostAndPort) |
static int |
getPort(URL url) |
static boolean |
isAbsoluteURI(String uri) |
static List<Chunk> |
readChunks(InputStream in) |
static int |
readChunkSize(InputStream in) |
static String |
readLine(InputStream in) |
public static DateFormat createGMTDateFormat()
public static String readLine(InputStream in) throws IOException, EndOfStreamException
IOExceptionEndOfStreamExceptionpublic static int readChunkSize(InputStream in) throws IOException
IOExceptionpublic static Response createNotFoundResponse()
public static Response createSOAPValidationErrorResponse(String message)
public static Response createResponse(int code, String msg, String body, String contentType, String... headers)
public static List<Chunk> readChunks(InputStream in) throws IOException
IOExceptionpublic static String getHostName(String destination) throws MalformedURLException
MalformedURLExceptionpublic static String getPathAndQueryString(String dest) throws MalformedURLException
MalformedURLExceptionpublic static int getPort(String hostAndPort)
public static int getPort(URL url) throws MalformedURLException
MalformedURLExceptionpublic static boolean isAbsoluteURI(String uri)
Copyright © 2012. All Rights Reserved.