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 on begin
19 public class PHPDocCharArrayCommentReader extends SingleCharReader {
21 private char[] fCharArray;
25 private int fStartPos;
29 private boolean fWasNewLine;
31 public PHPDocCharArrayCommentReader(char[] buf) {
32 this(buf, 0, buf.length);
35 public PHPDocCharArrayCommentReader(char[] buf, int start, int end) {
37 fStartPos = start + 3;
44 * @see java.io.Reader#read()
47 if (fCurrPos < fEndPos) {
51 ch = fCharArray[fCurrPos++];
52 } while (fCurrPos < fEndPos && Character.isWhitespace(ch));
54 if (fCurrPos < fEndPos) {
56 ch = fCharArray[fCurrPos++];
63 ch = fCharArray[fCurrPos++];
65 fWasNewLine = Strings.isLineDelimiterChar(ch);
73 * @see java.io.Reader#close()
80 * @see java.io.Reader#reset()