public final class EntityUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
appendParameter(String headerString,
String parameterName,
String parameterValue) |
static String |
createBoundaryValue()
Generated a unique value for a Multipart boundary string.
|
static ApplicationEDIEntity |
createEDIEntity(String ediMessage,
org.apache.http.entity.ContentType ediMessageContentType,
String contentTransferEncoding,
boolean isMainBody) |
static byte[] |
decode(byte[] data,
String encoding) |
static InputStream |
decode(InputStream is,
String encoding) |
static String |
decode(String data,
Charset charset,
String encoding) |
static byte[] |
decodeTransferEncodingOfBodyPartContent(String bodyPartContent,
org.apache.http.entity.ContentType contentType,
String bodyPartTransferEncoding) |
static byte[] |
encode(byte[] data,
String encoding) |
static OutputStream |
encode(OutputStream os,
String encoding) |
static String |
encode(String data,
Charset charset,
String encoding) |
static byte[] |
getContent(org.apache.http.HttpEntity entity) |
static org.apache.http.HttpEntity |
getMessageEntity(org.apache.http.HttpMessage message) |
static boolean |
hasEntity(org.apache.http.HttpMessage message) |
static String |
printEntity(org.apache.http.HttpEntity entity) |
static void |
printEntity(PrintStream out,
org.apache.http.HttpEntity entity) |
static void |
setMessageEntity(org.apache.http.HttpMessage message,
org.apache.http.HttpEntity entity) |
static boolean |
validateBoundaryValue(String boundaryValue) |
public static String createBoundaryValue()
The boundary string is composed of the components: "----=_Part_<global_part_number>_<newly_created_object's_hashcode>.<current_time>"
The generated string contains only US-ASCII characters and hence is safe for use in RFC822 headers.
public static boolean validateBoundaryValue(String boundaryValue)
public static String appendParameter(String headerString, String parameterName, String parameterValue)
public static String encode(String data, Charset charset, String encoding) throws Exception
Exception
public static OutputStream encode(OutputStream os, String encoding) throws Exception
Exception
public static String decode(String data, Charset charset, String encoding) throws Exception
Exception
public static InputStream decode(InputStream is, String encoding) throws Exception
Exception
public static ApplicationEDIEntity createEDIEntity(String ediMessage, org.apache.http.entity.ContentType ediMessageContentType, String contentTransferEncoding, boolean isMainBody) throws Exception
Exception
public static byte[] getContent(org.apache.http.HttpEntity entity)
public static boolean hasEntity(org.apache.http.HttpMessage message)
public static org.apache.http.HttpEntity getMessageEntity(org.apache.http.HttpMessage message)
public static void setMessageEntity(org.apache.http.HttpMessage message, org.apache.http.HttpEntity entity)
public static byte[] decodeTransferEncodingOfBodyPartContent(String bodyPartContent, org.apache.http.entity.ContentType contentType, String bodyPartTransferEncoding) throws Exception
Exception
public static void printEntity(PrintStream out, org.apache.http.HttpEntity entity) throws IOException
IOException
public static String printEntity(org.apache.http.HttpEntity entity) throws IOException
IOException
Apache Camel