Guest User

Untitled

a guest
Jul 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public interface WritableBuffer
  2. {
  3. void put(CharSequence chars);
  4. }
  5.  
  6. /**
  7. * Writable Buffer implementation based on a Netty ByteBuf
  8. */
  9. public class AmqpWritableBuffer implements WritableBuffer {
  10.  
  11. @Override
  12. public void put(CharSequence chars) {
  13. final int bytes = ByteBufUtil.utf8Bytes(chars);
  14. ByteBufUtil.reserveAndWriteUtf8(nettyBuffer, chars, bytes);
  15. }
  16.  
  17. }
Add Comment
Please, Sign In to add comment