List of usage examples for org.apache.commons.httpclient.methods ByteArrayRequestEntity getContent
public byte[] getContent()
From source file:com.baidu.oped.apm.profiler.modifier.connector.httpclient3.interceptor.ExecuteInterceptor.java
private String readByteArray(ByteArrayRequestEntity entity, String charSet) throws UnsupportedEncodingException { if (entity.getContent() == null) { return ""; }/*from w ww . ja v a2 s .c o m*/ final int length = entity.getContent().length > MAX_READ_SIZE ? MAX_READ_SIZE : entity.getContent().length; if (length <= 0) { return ""; } return new String(entity.getContent(), 0, length, charSet); }