docs: public void writeTo(OutputStream out) throws IOException
  	{
  		if (mLength > mBufferSizeLimit)
  		{
  			throw new IllegalStateException("Can't write after a buffer overflow.");
  		}
  
  		if (mLength == 0)
  		{
  			// nothing to do
  			return;
  		}
  
  		// write all previous chunks
  		int count = mCurrentChunkIndex;
  		for (int i = 0; i < count; ++i)
  		{
  			out.write(mChunkList.get(i));
  		}
  
  		// write the current partial chunk
  		out.write(mCurrentChunk, 0, mPosInChunk);
  	}