Package com.fasterxml.jackson.databind.util

Examples of com.fasterxml.jackson.databind.util.ByteBufferBackedOutputStream


    public ContainerRequest filter(ContainerRequest request) {

        int contentLength = Integer.parseInt(request.getHeaderValue("Content-Length"));
        // make it big enough to hold the path.
        ByteBuffer buf = ByteBuffer.allocateDirect(contentLength + 128);
        CodedOutputStream out = CodedOutputStream.newInstance(new ByteBufferBackedOutputStream(buf));
        InputStream in = request.getEntityInputStream();
       
        try {
            if (in.available() > 0) {
                // copy the json into a byte array. this will get reused later.
View Full Code Here


    public ByteBuffer deserialize(JsonParser jp, DeserializationContext ctxt,
            ByteBuffer intoValue)
        throws IOException, JsonProcessingException
    {
        // Let's actually read in streaming manner...
        OutputStream out = new ByteBufferBackedOutputStream(intoValue);
        jp.readBinaryValue(ctxt.getBase64Variant(), out);
        out.close();
        return intoValue;
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.jackson.databind.util.ByteBufferBackedOutputStream

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.