code: public void write(byte[] byteArray, int byteCount) throws IOException {
  
          writeStream.write(byteArray, 0, byteCount);
  
          bytesWritten += byteCount;
      }
docs: This class and subclasses should write to the underlying writeStream
  <b>ONLY WITH THIS METHOD</b>.
  That way we can be confident that bytesWritten will always be accurate.