Exemple #1
0
 /**
  * Constructs a new {@code PushbackReader} with {@code in} as source reader.
  * The size of the pushback buffer is set to {@code size}.
  *
  * @param in
  *            the source reader.
  * @param size
  *            the size of the pushback buffer.
  * @throws IllegalArgumentException
  *             if {@code size} is negative.
  */
 public PushbackReader(Reader inJ, int size)
     : base(inJ)
 {
     if (size <= 0) {
         throw new java.lang.IllegalArgumentException("size <= 0"); //$NON-NLS-1$
     }
     buf = new char[size];
     pos = size;
 }
Exemple #2
0
 /**
  * Constructs a new {@code PushbackReader} with the specified reader as
  * source. The size of the pushback buffer is set to the default value of 1
  * character.
  *
  * @param in
  *            the source reader.
  */
 public PushbackReader(Reader inJ)
     : base(inJ)
 {
     buf = new char[1];
     pos = 1;
 }
 /**
  * Constructs a new BufferedReader on the Reader {@code in}. The buffer
  * size is specified by the parameter {@code size}.
  *
  * @param in
  *            the Reader that is buffered.
  * @param size
  *            the size of the buffer to allocate.
  * @throws IllegalArgumentException
  *             if {@code size <= 0}.
  */
 public BufferedReader(Reader inJ, int size)
     : base(inJ)
 {
     if (size <= 0) {
         throw new java.lang.IllegalArgumentException("size <= 0"); //$NON-NLS-1$
     }
     this.inJ = inJ;
     buf = new char[size];
 }
 /**
  * Constructs a new BufferedReader on the Reader {@code in}. The
  * buffer gets the default size (8 KB).
  *
  * @param in
  *            the Reader that is buffered.
  */
 public BufferedReader(Reader inJ)
     : base(inJ)
 {
     this.inJ = inJ;
     buf = new char[8192];
 }
 /**
  * Constructs a new {@code StreamTokenizer} with {@code r} as source reader.
  * The tokenizer's initial state is as follows:
  * <ul>
  * <li>All byte values 'A' through 'Z', 'a' through 'z', and '&#92;u00A0'
  * through '&#92;u00FF' are considered to be alphabetic.</li>
  * <li>All byte values '&#92;u0000' through '&#92;u0020' are considered to
  * be white space. '/' is a comment character.</li>
  * <li>Single quote '\'' and double quote '"' are string quote characters.
  * </li>
  * <li>Numbers are parsed.</li>
  * <li>End of lines are considered to be white space rather than separate
  * tokens.</li>
  * <li>C-style and C++-style comments are not recognized.</LI>
  * </ul>
  *
  * @param r
  *            the source reader from which to parse tokens.
  */
 public StreamTokenizer(Reader r)
     : this()
 {
     if (r == null) {
         throw new java.lang.NullPointerException();
     }
     inReader = r;
 }
Exemple #6
0
 /**
  * Constructs a new FilterReader on the Reader {@code in}.
  *
  * @param in
  *            The non-null Reader to filter reads on.
  */
 protected FilterReader(Reader inJ)
     : base(inJ)
 {
     this.inJ = inJ;
 }
 /**
  * Constructs a new LineNumberReader on the Reader {@code in}. The size of
  * the internal buffer is specified by the parameter {@code size}.
  *
  * @param in
  *            the Reader that is buffered.
  * @param size
  *            the size of the buffer to allocate.
  * @throws IllegalArgumentException
  *             if {@code size &lt;= 0}.
  */
 public LineNumberReader(Reader inJ, int size)
     : base(inJ, size)
 {
 }
 /**
  * Constructs a new LineNumberReader on the Reader {@code in}. The internal
  * buffer gets the default size (8 KB).
  *
  * @param in
  *            the Reader that is buffered.
  */
 public LineNumberReader(Reader inJ)
     : base(inJ)
 {
 }
Exemple #9
0
 /*
  * Constructs a new {@code PushbackReader} with the specified reader as
  * source. The size of the pushback buffer is set to the default value of 1
  * character.
  *
  * @param in
  *            the source reader.
  */
 public PushbackReader(Reader inJ) : base(inJ)
 {
     buf = new char[1];
     pos = 1;
 }