aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-12 17:12:24 -0700
committerSven Gothel <[email protected]>2009-10-12 17:12:24 -0700
commit3c5fe7f58a2e7816c86ab0b85fb3a4e7cd2113ce (patch)
tree5b1dfa3708f3f760d984f7cb41d847552e6b6bea /src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java
parent22e98bcb38d51c5f9170d4d3d5afea89647413d4 (diff)
parent03bf321dc0aac6a2bc635093d634e1c8e67f8d43 (diff)
Merge branch 'master' of ssh://git.kenai.com/gluegen~gluegen-git
Diffstat (limited to 'src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java')
-rwxr-xr-xsrc/java/com/sun/gluegen/pcpp/ConcatenatingReader.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java b/src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java
index 11249f7..6da77be 100755
--- a/src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java
+++ b/src/java/com/sun/gluegen/pcpp/ConcatenatingReader.java
@@ -48,16 +48,17 @@ public class ConcatenatingReader extends FilterReader {
// Any leftover characters go here
private char[] curBuf;
private int curPos;
- private BufferedReader in;
+ private BufferedReader reader;
private static String newline = System.getProperty("line.separator");
/** This class requires that the input reader be a BufferedReader so
it can do line-oriented operations. */
public ConcatenatingReader(BufferedReader in) {
super(in);
- this.in = in;
+ this.reader = in;
}
+ @Override
public int read() throws IOException {
char[] tmp = new char[1];
int num = read(tmp, 0, 1);
@@ -67,24 +68,29 @@ public class ConcatenatingReader extends FilterReader {
}
// It's easier not to support mark/reset since we don't need it
+ @Override
public boolean markSupported() {
return false;
}
+ @Override
public void mark(int readAheadLimit) throws IOException {
throw new IOException("mark/reset not supported");
}
+ @Override
public void reset() throws IOException {
throw new IOException("mark/reset not supported");
}
+ @Override
public boolean ready() throws IOException {
- if (curBuf != null || in.ready())
+ if (curBuf != null || reader.ready())
return true;
return false;
}
+ @Override
public int read(char[] cbuf, int off, int len) throws IOException {
if (curBuf == null) {
nextLine();
@@ -110,6 +116,7 @@ public class ConcatenatingReader extends FilterReader {
return numRead;
}
+ @Override
public long skip(long n) throws IOException {
long numSkipped = 0;
@@ -126,7 +133,7 @@ public class ConcatenatingReader extends FilterReader {
}
private void nextLine() throws IOException {
- String cur = in.readLine();
+ String cur = reader.readLine();
if (cur == null) {
curBuf = null;
return;