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;
14 import java.io.IOException;
15 import java.io.Reader;
17 public abstract class SingleCharReader extends Reader {
22 public abstract int read() throws IOException;
25 * @see Reader#read(char[],int,int)
27 public int read(char cbuf[], int off, int len) throws IOException {
29 for (int i= off; i < end; i++) {
46 public boolean ready() throws IOException {
51 * Gets the content as a String
53 public String getString() throws IOException {
54 StringBuffer buf= new StringBuffer();
56 while ((ch= read()) != -1) {
59 return buf.toString();