code: @Override
      public void write(byte[] b, int offset, int length) throws IOException {
          if (length == 0) {
              return;
          }
          int newcount = count + length;
          if (newcount > buf.length) {
              buf = Arrays.copyOf(buf, oversize(newcount));
          }
          System.arraycopy(b, offset, buf, count, length);
          count = newcount;
      }
docs: Write byte array.
  
  @param b      byte array
  @param offset offset
  @param length length
  @throws IOException if write fails