com.softwareag.tamino.db.api.io
Class TBufferedReader
java.lang.Object
java.io.Reader
java.io.FilterReader
com.softwareag.tamino.db.api.io.TBufferedReader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public class TBufferedReader
- extends java.io.FilterReader
A TBufferedReader buffers the whole content of the given Reader.
With such an object it is possible to use the mark() and reset() feature on the
whole Reader.
- Version:
- $Revision: 1.2 $
- Author:
- Stefan Liebig
Fields inherited from class java.io.FilterReader |
in |
Fields inherited from class java.io.Reader |
lock |
Constructor Summary |
TBufferedReader(java.io.Reader reader)
Create a TBufferedReader instance from the given Reader. |
TBufferedReader(java.io.Reader reader,
boolean ignoreClose)
Create a TBufferedReader instance from the given Reader. |
Method Summary |
void |
close()
Close this Reader. |
Methods inherited from class java.io.FilterReader |
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 |
TBufferedReader
public TBufferedReader(java.io.Reader reader)
throws java.io.IOException
- Create a TBufferedReader instance from the given Reader.
- Parameters:
reader
- to buffer in the whole length
- Throws:
java.io.IOException
- returned in case of problems with the given reader.
TBufferedReader
public TBufferedReader(java.io.Reader reader,
boolean ignoreClose)
throws java.io.IOException
- Create a TBufferedReader instance from the given Reader.
With this constructor you can force this object not to delegate a close() on it.
In some rare cases (passing this reader to a parser) it is undesired to have
it closed!
- Parameters:
reader
- to buffer in the whole lengthignoreClose
- ignore the close request
- Throws:
java.io.IOException
- returned in case of problems with the given reader.
close
public void close()
throws java.io.IOException
- Close this Reader.
Closing the contained StringReader is only done when specified in the constructor.
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.FilterReader
- Throws:
java.io.IOException
Copyright (c) 2013 Software AG. All Rights Reserved.