com.softwareag.tamino.db.api.io
Class TBufferedByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by com.softwareag.tamino.db.api.io.TBufferedByteArrayInputStream
All Implemented Interfaces:
java.io.Closeable

public class TBufferedByteArrayInputStream
extends java.io.FilterInputStream

A TBufferedByteArrayInputStream buffers the whole content of the given InputStream. With such an object it is possible to use the mark() and reset() feature on the whole InputStream.

Version:
$Revision: 1.3 $
Author:
Stefan Liebig
See Also:
ByteArrayInputStream

Field Summary
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
TBufferedByteArrayInputStream(java.io.InputStream inputStream)
          Create a TBufferedByteArrayInputStream instance from the given InputStream.
TBufferedByteArrayInputStream(java.io.InputStream inputStream, boolean ignoreClose)
          Create a TBufferedByteArrayInputStream instance from the given InputStream.
 
Method Summary
 void close()
          Close this inputStream.
 
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TBufferedByteArrayInputStream

public TBufferedByteArrayInputStream(java.io.InputStream inputStream)
                              throws java.io.IOException
Create a TBufferedByteArrayInputStream instance from the given InputStream.

Parameters:
inputStream - to buffer in the whole length
Throws:
java.io.IOException - returned in case of problems with the given inputStream.

TBufferedByteArrayInputStream

public TBufferedByteArrayInputStream(java.io.InputStream inputStream,
                                     boolean ignoreClose)
                              throws java.io.IOException
Create a TBufferedByteArrayInputStream instance from the given InputStream. With this constructor you can force the this object not to delegate a close() on it. In some rare cases (passing this inputStream to a parser) it is undesired to have it closed!

Parameters:
inputStream - to buffer in the whole length
ignoreClose - ignore the close request
Throws:
java.io.IOException - returned in case of problems with the given inputStream.
Method Detail

close

public void close()
           throws java.io.IOException
Close this inputStream. Closing the contained byteInputStream is only done when specified in the constructor.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterInputStream
Throws:
java.io.IOException


Copyright (c) 2013 Software AG. All Rights Reserved.