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.core.IBuffer;
14 import net.sourceforge.phpdt.internal.corext.util.Strings;
17 * Reads a phpdoc comment from a phpdoc comment. Skips star-character on begin
20 public class PHPDocBufferCommentReader extends SingleCharReader {
22 private IBuffer fBuffer;
26 private int fStartPos;
30 private boolean fWasNewLine;
32 public PHPDocBufferCommentReader(IBuffer buf, int start, int end) {
34 fStartPos = start + 3;
41 * @see java.io.Reader#read()
44 if (fCurrPos < fEndPos) {
48 ch = fBuffer.getChar(fCurrPos++);
49 } while (fCurrPos < fEndPos && Character.isWhitespace(ch));
51 if (fCurrPos < fEndPos) {
53 ch = fBuffer.getChar(fCurrPos++);
60 ch = fBuffer.getChar(fCurrPos++);
62 fWasNewLine = Strings.isLineDelimiterChar(ch);
70 * @see java.io.Reader#close()
77 * @see java.io.Reader#reset()