code: public Message setBuffer(byte[] b, int offset, int length) {
          buf=b;
          if(buf != null) {
              if(offset < 0 || offset > buf.length)
                  throw new ArrayIndexOutOfBoundsException(offset);
              if((offset + length) > buf.length)
                  throw new ArrayIndexOutOfBoundsException((offset+length));
              this.offset=offset;
              this.length=length;
          }
          else
              this.offset=this.length=0;
          return this;
      }
docs: Sets the internal buffer to point to a subset of a given buffer.<p/>
  <em>
  Note that the byte[] buffer passed as argument must not be modified. Reason: if we retransmit the
  message, it would still have a ref to the original byte[] buffer passed in as argument, and so we would
  retransmit a changed byte[] buffer !
  </em>
  
  @param b The reference to a given buffer. If null, we'll reset the buffer to null
  @param offset The initial position
  @param length The number of bytes