code: public void write(byte[] b, int off, int len) throws IOException {
          checkForClosed();
          if (b == null) {
              throw new NullPointerException();
          } else if ((off < 0) || (len < 0) || ((off + len) > b.length)) {
              throw new IndexOutOfBoundsException();
          } else if (len == 0) {
              return;
          }
          if (len > bytesLeftInBuffer()) {
              int bytesToWrite = bytesLeftInBuffer();
              write(b, off, bytesToWrite);
              write(b, off + bytesToWrite, len - bytesToWrite);
          } else {
              System.arraycopy(b, off, _buffer, _bufferOffset, len);
              _bufferOffset += len;
              if (bytesLeftInBuffer() == 0) {
                  writeBufferToFile();
              }
          }
      }
docs: /*
  (non-Javadoc)
  
  @see java.io.OutputStream#write(byte[], int, int)