@Override public long getContentLength() { return entity.getContentLength(); }
@Override public String getContentType() { return entity.getContentType(); } }
@Override public boolean isChunked() { return entity.isChunked(); }
@Override public boolean isRepeatable() { return entity.isRepeatable(); } }
@Override public void writeRequest(OutputStream outStream) throws IOException { entity.writeRequest(outStream); }
public void writeRequest(OutputStream outStream) throws IOException { if (chunked) { internalWriteRequest(outStream); } else { content.writeTo(outStream); } }
|| Constants.Configuration.HTTP_METHOD_PUT.equalsIgnoreCase(httpMethod)) { gzip = msgContext.isPropertyTrue(HTTPConstants.MC_GZIP_REQUEST); requestEntity = new AxisRequestEntity(messageFormatter, msgContext, format, contentType, chunked, gzip, authenticator != null && authenticator.isAllowedRetry()); } else {
@Override public boolean isRepeatable() { return entity.isRepeatable(); }
@Override public void writeTo(OutputStream outputStream) throws IOException { entity.writeRequest(outputStream); }
/** * Method calls to this request entity are delegated to the following Axis2 * message formatter object. * * @param messageFormatter * @throws AxisFault */ AxisRequestEntity(MessageFormatter messageFormatter, MessageContext msgContext, OMOutputFormat format, String contentType, boolean chunked, boolean gzip, boolean preserve) throws AxisFault { this.messageFormatter = messageFormatter; this.messageContext = msgContext; this.chunked = chunked; this.gzip = gzip; this.preserve = preserve; this.format = format; this.contentType = contentType; if (chunked) { content = null; } else { content = Blobs.createMemoryBlob(); OutputStream out = content.getOutputStream(); try { internalWriteRequest(out); out.close(); } catch (IOException ex) { throw AxisFault.makeFault(ex); } } }
@Override public Header getContentType() { return new BasicHeader(HTTPConstants.HEADER_CONTENT_TYPE, entity.getContentType()); }
entityEnclosingMethod.setContentChunked(requestEntity.isChunked()); method = entityEnclosingMethod;
@Override public long getContentLength() { return entity.getContentLength(); }