public void writeRawBytes(final byte[] value,int offset,int length) throws IOException {
  if (buffer.remaining() >= length) {
    buffer.put(value,offset,length);
  }
 else {
    throw new OutOfSpaceException(buffer.position(),buffer.limit());
  }
}

public void writeRawBytes ( final byte [ ] value , int offset , int length ) throws IOException { if ( buffer . remaining ( ) >= length ) { buffer . put ( value , offset , length ) ; } else { throw new OutOfSpaceException ( buffer . position ( ) , buffer . limit ( ) ) ; } }
write part of an array of bytes .
