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
IOException
EndOfStreamException
public static int readChunkSize(InputStream in) throws IOException
IOException
public 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
IOException
public static String getHostName(String destination) throws MalformedURLException
MalformedURLException
public static String getPathAndQueryString(String dest) throws MalformedURLException
MalformedURLException
public static int getPort(String hostAndPort)
public static int getPort(URL url) throws MalformedURLException
MalformedURLException
public static boolean isAbsoluteURI(String uri)
Copyright © 2012. All Rights Reserved.