private void readNewChars(int additionLength)
	throws IOException
	{
		// DEBUG-X-BEGIN
		//System.err.println("readUpTo(" + additionLength + ")");
		// DEBUG-X-END
		if(additionLength == 0) return;
		int originalLength = size();
		if(originalLength + additionLength >= circleBuffer.length)
		{
			char[] newCircleBuffer = readBuffer(head,tail,Math.max(circleBuffer.length * 2,circleBuffer.length + additionLength));
			head = 0;
			tail = originalLength;
			circleBuffer = newCircleBuffer;
		}
		int readLength = 0;
		int readLength2 = 0;
		if(tail + additionLength > circleBuffer.length)
		{
			readLength = reader.read(circleBuffer,tail,circleBuffer.length - tail);
			if(readLength == circleBuffer.length - tail)
			{
				readLength2 = reader.read(circleBuffer,0,additionLength - (circleBuffer.length - tail));
				if(readLength2 >= 0) readLength += readLength2;
			}
		}
		else
		{
			readLength = reader.read(circleBuffer,tail,additionLength);
		}
		if(readLength < additionLength || readLength2 == -1) eofReached = true;
		if(readLength > 0)
		{
			bufferEnd += readLength;
			tail = (tail + readLength) % circleBuffer.length;
		}
	}