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 |
createResponse(int code,
String msg,
byte[] body,
String contentType,
String... headers) |
static Response |
createSOAPValidationErrorResponse(String message) |
static String |
getFaultSOAP12Body(String title,
String text) |
static String |
getFaultSOAPBody(String title,
String text) |
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 void |
readChunksAndDrop(InputStream in) |
static int |
readChunkSize(InputStream in) |
static String |
readLine(InputStream in) |
static Response |
setHTMLErrorResponse(Response.ResponseBuilder responseBuilder,
String message,
String comment) |
public static DateFormat createGMTDateFormat()
public static String readLine(InputStream in) throws IOException, EndOfStreamException
IOExceptionEndOfStreamExceptionpublic static int readChunkSize(InputStream in) throws IOException
IOExceptionpublic static Response setHTMLErrorResponse(Response.ResponseBuilder responseBuilder, String message, String comment)
public static Response createSOAPValidationErrorResponse(String message)
public static Response createResponse(int code, String msg, byte[] body, String contentType, String... headers)
public static List<Chunk> readChunks(InputStream in) throws IOException
IOExceptionpublic static void readChunksAndDrop(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 © 2021. All Rights Reserved.