public void write(final byte b[],final int off,final int len) throws IOException {
  if (!m_open) {
    throw new IllegalStateException("Already written");
  }
  if ((m_cursor + len) > WORM_STREAM_BUFFER_SIZE) {
    for (int i=0; i < len; i++) {
      write(b[off + i]);
    }
  }
 else {
    System.arraycopy(b,off,m_buffer,m_cursor,len);
    m_cursor+=len;
  }
}

public void write ( final byte b [ ] , final int off , final int len ) throws IOException { if ( ! m_open ) { throw new IllegalStateException ( "Already written" ) ; } if ( ( m_cursor + len ) > WORM_STREAM_BUFFER_SIZE ) { for ( int i = 0 ; i < len ; i ++ ) { write ( b [ off + i ] ) ; } } else { System . arraycopy ( b , off , m_buffer , m_cursor , len ) ; m_cursor += len ; } }
write byte array to the buffer we need to be able to efficiently handle large arrays beyond size of the blobthreshold , so
