foundry.io
Class InterpolatingBufferedReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.BufferedReader
|
+--foundry.io.InterpolatingBufferedReader
- public class InterpolatingBufferedReader
- extends BufferedReader
Fields inherited from class java.io.BufferedReader |
cb, defaultCharBufferSize, defaultExpectedLineLength, in, INVALIDATED, markedChar, markedSkipLF, nChars, nextChar, readAheadLimit, skipLF, UNMARKED |
Methods inherited from class java.io.BufferedReader |
, close, ensureOpen, fill, mark, markSupported, read1, readLine, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
startOfTokenDelimiter
private String startOfTokenDelimiter
endOfTokenDelimiter
private String endOfTokenDelimiter
isStrict
private boolean isStrict
cache
private final StringBuffer cache
DEFAULT_BUFFER_SIZE
protected static final int DEFAULT_BUFFER_SIZE
InterpolatingBufferedReader
public InterpolatingBufferedReader(Reader in,
int bufferSize,
String startOfTokenDelimiter,
String endOfTokenDelimiter,
boolean isStrict)
- Creates a new
InterpolatingBufferedReader
that
wraps, buffers and strips comments from the supplied Reader
.
- Parameters:
in
- the underlying Reader
InterpolatingBufferedReader
public InterpolatingBufferedReader(Reader in)
InterpolatingBufferedReader
public InterpolatingBufferedReader(Reader in,
int bufferSize)
constructCache
protected StringBuffer constructCache()
isStrict
public boolean isStrict()
setStrict
public void setStrict(boolean isStrict)
setStartOfTokenDelimiter
public void setStartOfTokenDelimiter(String start)
getStartOfTokenDelimiter
public String getStartOfTokenDelimiter()
setEndOfTokenDelimiter
public void setEndOfTokenDelimiter(String end)
getEndOfTokenDelimiter
public String getEndOfTokenDelimiter()
read
public int read()
throws IOException
- Overrides:
read
in class BufferedReader
read
public int read(char[] bucket)
throws IOException
- Overrides:
read
in class Reader
reallocateBuffer
private char[] reallocateBuffer(char[] original,
int size)
read
public int read(char[] bucket,
int offset,
int readThisMany)
throws IllegalArgumentException,
IOException
- Overrides:
read
in class BufferedReader
readLine
public String readLine()
throws IOException
- Overrides:
readLine
in class BufferedReader
interpolate0
private final LinkedList interpolate0(char[] source)
throws IOException
interpolate0
private final LinkedList interpolate0(char[] source,
int offset,
int length)
throws IOException
interpolate
public String interpolate(char[] source)
throws IOException
interpolate
public String interpolate(String source)
throws IOException
getValueForToken
public String getValueForToken(String token)
throws IOException
Copyright © 2000 - Laird Jarrett Nelson