1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.corext.phpdoc;
13 import net.sourceforge.phpdt.internal.corext.util.Strings;
16 * Reads a phpdoc comment from a phpdoc comment. Skips star-character
19 public class PHPDocCharArrayCommentReader extends SingleCharReader {
21 private char[] fCharArray;
23 private int fStartPos;
26 private boolean fWasNewLine;
28 public PHPDocCharArrayCommentReader(char[] buf) {
29 this(buf, 0, buf.length);
32 public PHPDocCharArrayCommentReader(char[] buf, int start, int end) {
41 * @see java.io.Reader#read()
44 if (fCurrPos < fEndPos) {
48 ch = fCharArray[fCurrPos++];
49 } while (fCurrPos < fEndPos && Character.isWhitespace(ch));
51 if (fCurrPos < fEndPos) {
53 ch = fCharArray[fCurrPos++];
60 ch = fCharArray[fCurrPos++];
62 fWasNewLine = Strings.isLineDelimiterChar(ch);
70 * @see java.io.Reader#close()
77 * @see java.io.Reader#reset()