Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.client.call;
 
 
Simple GetContentProcessor implementation for GETting content and aggregating it in (and returning as) com.fasterxml.storemate.shared.util.ByteAggregator.
        return new Handler();
    }

    
Simple PutContentProvider implementation that collects content as bytes, producing a com.fasterxml.storemate.shared.util.ByteAggregator.
    public static class Handler extends GetContentProcessor.Handler<ByteAggregator>
    {
        protected  ByteAggregator _bytes;
        
        public Handler() { }
        @Override
        public boolean processContent(byte[] contentint offsetint length)
            throws IOException
        {
             = ByteAggregator.with(contentoffsetlength);
            // yeah, let's get all there is?
            return true;
        }
        @Override
        public ByteAggregator completeContentProcessing() throws IOException
        {
            if ( == null) {
                 = new ByteAggregator();
            }
            return ;
        }
        @Override
        public void contentProcessingFailed(Throwable cause) { }
    }
New to GrepCode? Check out our FAQ X