Package com.linkedin.data

Examples of com.linkedin.data.ByteString.asByteBuffer()


      {
        nettyRequest.setHeader(e.getKey(), e.getValue());
      }

      final ByteString entity = request.getEntity();
      ChannelBuffer buf = ChannelBuffers.wrappedBuffer(entity.asByteBuffer());
      nettyRequest.setContent(buf);
      nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, entity.length());

      return nettyRequest;
    }
View Full Code Here


      for (Map.Entry<String, String> e : response.getHeaders().entrySet())
      {
        nettyResponse.setHeader(e.getKey(), e.getValue());
      }
      final ByteString entity = response.getEntity();
      ChannelBuffer buf = ChannelBuffers.wrappedBuffer(entity.asByteBuffer());
      nettyResponse.setContent(buf);
      nettyResponse.setHeader(HttpHeaders.Names.CONTENT_LENGTH, entity.length());

      return nettyResponse;
    }
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.