Package org.restlet.representation

Examples of org.restlet.representation.InputRepresentation


            response.setEntity("", MediaType.TEXT_PLAIN);
        } else if (body instanceof Response) {
            // its already a restlet response, so dont do anything
            LOG.debug("Using existing Restlet Response from exchange body: {}", body);
        } else if (body instanceof InputStream) {
            response.setEntity(new InputRepresentation(out.getBody(InputStream.class), mediaType));
        } else if (body instanceof File) {
            response.setEntity(new FileRepresentation(out.getBody(File.class), mediaType));
        } else {
            // fallback and use string
            String text = out.getBody(String.class);
View Full Code Here


    addHeaders();   
    return result;
  }
 
  protected InputRepresentation createPdfResult(InputStream inputStream) {
    InputRepresentation inputRepresentation = new InputRepresentation(inputStream);
    inputRepresentation.setMediaType(MediaType.APPLICATION_PDF);
    return inputRepresentation;
  }
View Full Code Here

TOP

Related Classes of org.restlet.representation.InputRepresentation

Copyright © 2018 www.massapicom. 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.