Package play.mvc.Http

Examples of play.mvc.Http.RawBuffer.asBytes()


        RawBuffer raw = request.body().asRaw();

        byte[] buf;

        try {
            buf = raw.asBytes();
        } catch (NullPointerException e) {
            // asBytes() raises NullPointerException if the raw body is larger
            // than the limit defined by BodyParser.of annotation at
            // SvnApp.service() method.
            throw new IOException("Request entity is too large.", e);
View Full Code Here


     */
    public static PipedInputStream gitRpc(final Project project, String service, Request request, Response response) {
        response.setContentType("application/x-" + service + "-result");

        RawBuffer raw = request.body().asRaw();
        byte[] buf = raw.asBytes();
        InputStream requestStream = null;

        try {
            // If the content size is bigger than memoryThreshold,
            // which is defined as 100 * 1024 in play.api.mvc.BodyParsers trait,
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.