src/share/classes/java/io/CharArrayReader.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * This class implements a character buffer that can be used as a
  30  * character-input stream.
  31  *
  32  * @author      Herb Jellinek
  33  * @since       JDK1.1
  34  */
  35 public class CharArrayReader extends Reader {
  36     /** The character buffer. */
  37     protected char buf[];
  38 
  39     /** The current buffer position. */
  40     protected int pos;
  41 
  42     /** The position of mark in buffer. */
  43     protected int markedPos = 0;
  44 
  45     /**
  46      *  The index of the end of this buffer.  There is not valid
  47      *  data at or beyond this index.
  48      */
  49     protected int count;
  50 
  51     /**
  52      * Creates a CharArrayReader from the specified array of chars.
  53      * @param buf       Input buffer (not copied)




  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package java.io;
  27 
  28 /**
  29  * This class implements a character buffer that can be used as a
  30  * character-input stream.
  31  *
  32  * @author      Herb Jellinek
  33  * @since       1.1
  34  */
  35 public class CharArrayReader extends Reader {
  36     /** The character buffer. */
  37     protected char buf[];
  38 
  39     /** The current buffer position. */
  40     protected int pos;
  41 
  42     /** The position of mark in buffer. */
  43     protected int markedPos = 0;
  44 
  45     /**
  46      *  The index of the end of this buffer.  There is not valid
  47      *  data at or beyond this index.
  48      */
  49     protected int count;
  50 
  51     /**
  52      * Creates a CharArrayReader from the specified array of chars.
  53      * @param buf       Input buffer (not copied)