Package org.restlet.representation

Examples of org.restlet.representation.ReaderRepresentation


            } else if (InputRepresentation.class.isAssignableFrom(target)) {
                result = new InputRepresentation(source.getStream());
            } else if (Reader.class.isAssignableFrom(target)) {
                result = source.getReader();
            } else if (ReaderRepresentation.class.isAssignableFrom(target)) {
                result = new ReaderRepresentation(source.getReader());
            } else if (Serializable.class.isAssignableFrom(target)
                    || (target == null)) {
                if (source instanceof ObjectRepresentation<?>) {
                    result = ((ObjectRepresentation<?>) source).getObject();
                } else {
View Full Code Here


        } else if (source instanceof InputStream) {
            result = new InputRepresentation((InputStream) source,
                    MediaType.getMostSpecific(target.getMediaType(),
                            MediaType.APPLICATION_OCTET_STREAM));
        } else if (source instanceof Reader) {
            result = new ReaderRepresentation((Reader) source,
                    MediaType.getMostSpecific(target.getMediaType(),
                            MediaType.TEXT_PLAIN));
        } else if (source instanceof Representation) {
            result = (Representation) source;
        } else if (source instanceof Serializable) {
View Full Code Here

TOP

Related Classes of org.restlet.representation.ReaderRepresentation

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.