73747576777879
* @param underlying the underlying byte array * @return a HornetQBuffer wrapping the underlying byte array */ public static HornetQBuffer wrappedBuffer(final byte[] underlying) { return new ChannelBufferWrapper(Unpooled.wrappedBuffer(underlying)); }
84858687888990
* @param size the size of the created HornetQBuffer * @return a fixed HornetQBuffer with the given size */ public static HornetQBuffer fixedBuffer(final int size) { return new ChannelBufferWrapper(Unpooled.buffer(size, size)); }
32333435363738
* @param size the initial size of the created HornetQBuffer * @return a self-expanding HornetQBuffer starting with the given size */ public static HornetQBuffer dynamicBuffer(final int size) { return new ChannelBufferWrapper(ChannelBuffers.dynamicBuffer(size)); }
47484950515253
{ ChannelBuffer buff = ChannelBuffers.dynamicBuffer(bytes.length); buff.writeBytes(bytes); return new ChannelBufferWrapper(buff); }
6061626364656667686970
* @param underlying the underlying NIO ByteBuffer * @return a HornetQBuffer wrapping the underlying NIO ByteBuffer */ public static HornetQBuffer wrappedBuffer(final ByteBuffer underlying) { HornetQBuffer buff = new ChannelBufferWrapper(ChannelBuffers.wrappedBuffer(underlying)); buff.clear(); return buff; }
75767778798081
* @param underlying the underlying byte array * @return a HornetQBuffer wrapping the underlying byte array */ public static HornetQBuffer wrappedBuffer(final byte[] underlying) { return new ChannelBufferWrapper(ChannelBuffers.wrappedBuffer(underlying)); }
86878889909192
* @param size the size of the created HornetQBuffer * @return a fixed HornetQBuffer with the given size */ public static HornetQBuffer fixedBuffer(final int size) { return new ChannelBufferWrapper(ChannelBuffers.buffer(size)); }
31323334353637
46474849505152
5960616263646566676869