Cleanup and bugfix BufferedReader.

This change includes the following functional changes:
 - changing read to not clear the mark upon reading EOF. The previous behaviour was incorrect.
 - changing read(char[], int, int) to use the 'read directly from the source stream' shortcut when the mark has exceeded its limit. Previously we took the shortcut only when the mark was unset.

And these nonfunctional changes:
 - rewrote read(char[], int, int). The new revision contains only one call to 'System.arrayCopy' and the related bookkeeping. Previously there was one call before the loop, and another call in the loop.
 - renamed markpos to mark
 - renamed marklimit to markLimit
 - renamed count to end (it isn't a count, it's a position)
 - renamed fillbuf() to fillBuf()
 - simplified conditions that used >= when > was impossible
 - reducing the number of field reads where convenient

This tidy up is intended to prepare BufferedReader for some further bugfixing. We've seen some bugs reported against readLine() and I found it quite frustrating to work on the code when the names were wrong (ie. count) or of a foreign style (such as fillbuf()). I also attempted to document what the heck was going on in the more sophiticated methods.

git-svn-id: https://svn.apache.org/repos/asf/harmony/enhanced/classlib/trunk@835212 13f79535-47bb-0310-9956-ffa450edef68
1 file changed