Examples of ByteArrayEntity


Examples of org.apache.http.entity.ByteArrayEntity

            code = HttpStatus.SC_BAD_REQUEST;
        }
        response.setStatusCode(code);

        byte[] msg = EncodingUtils.getAsciiBytes(ex.getMessage());
        ByteArrayEntity entity = new ByteArrayEntity(msg);
        entity.setContentType("text/plain; charset=US-ASCII");
        response.setEntity(entity);
    }
View Full Code Here

Examples of org.apache.http.entity.ByteArrayEntity

        if (entity == null) {
            byte[] data = in.getBody(byte[].class);
            if (data == null) {
                return null;
            }
            entity = new ByteArrayEntity(data);
            String contentType = in.getHeader("Content-Type", String.class);
            if (contentType != null) {
                ((ByteArrayEntity) entity).setContentType(contentType);
            }
            String contentEncoding = in.getHeader("Content-Encoding", String.class);
View Full Code Here

Examples of org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity

    String contentId = attachment.getContentId();
    if (contentId==null) {
      return null;
    }
   
    ByteArrayEntity byteArray = dbEntityManger.selectById(ByteArrayEntity.class, contentId);
    byte[] bytes = byteArray.getBytes();
   
    return new ByteArrayInputStream(bytes);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.