|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
java.io.BufferedReader
gov.nih.nlm.umls.io.PushBackReader
public class PushBackReader
Extends BufferedReader to provide the ability to
push a single line of input back onto the reader to read it again
on the next readLine() call.
| Field Summary | |
|---|---|
protected String |
line
|
protected String |
null_value
|
protected boolean |
null_value_flag
|
protected String |
regex_null_value
|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
PushBackReader(Reader r)
Instantiates a new PushBackReader wrapped around the
specified reader. |
|
PushBackReader(Reader r,
int bufSize)
Instantiates a new PushBackReader wrapped around the
specified reader. |
|
| Method Summary | |
|---|---|
String |
getNullValue()
Returns the null value. |
boolean |
isEmptyValue(String token)
Indicates whether or not the specified token is null or contains a null value as defined by being either zero length or a value equal to the null value. |
void |
push(String line)
Push a line of input back onto the reader. |
String |
readLine()
Returns the next line from the reader. |
protected String |
resolveNull(String line)
Replaces all "null value" characters in the line. |
void |
setNullValue(String null_value)
Sets the null value to use. |
| Methods inherited from class java.io.BufferedReader |
|---|
close, mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.io.Reader |
|---|
read, read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String line
protected String null_value
protected String regex_null_value
protected boolean null_value_flag
| Constructor Detail |
|---|
public PushBackReader(Reader r)
PushBackReader wrapped around the
specified reader.
r - BufferedReader
public PushBackReader(Reader r,
int bufSize)
PushBackReader wrapped around the
specified reader.
r - BufferedReader| Method Detail |
|---|
public void setNullValue(String null_value)
setNullValue in interface LocalNullValueSupportnull_value - the new null string valuepublic String getNullValue()
getNullValue in interface LocalNullValueSupportpublic boolean isEmptyValue(String token)
isEmptyValue in interface LocalNullValueSupport
public String readLine()
throws IOException
readLine in class BufferedReaderIOExceptionprotected String resolveNull(String line)
line - input line
public void push(String line)
line - input line to be pushed back on reader
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||