code: @NotNull
  	public static ByteBuf allocateExact(int size) {
  		ByteBuf buf = allocate(size);
  		int d = buf.writeRemaining() - size;
  		buf.tail(d);
  		buf.head(d);
  		return buf;
  	}
docs: Allocates byte buffer in the same way as {@link #allocate(int)} does, but
  sets its positions so that write-remaining is equal to requested size.
  <p>
  For example, if you need a {@code ByteBuf} of size 21,
  a {@code ByteBuf} of size 32 is allocated. (|______|)<br>
  But its read/write positions are set to 11 so that only last 21 are writable (|__####|)
  <p>
  @param size requested size
  @return byte buffer from this pool with appropriate positions set