com.levigo.jadice.document.io
Class UncloseableSubfileSeekableInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.levigo.jadice.document.io.SeekableInputStream
          extended by com.levigo.jadice.document.io.SubfileSeekableInputStream
              extended by com.levigo.jadice.document.io.UncloseableSubfileSeekableInputStream
All Implemented Interfaces:
Closeable, DataInput, ImageInputStream

public class UncloseableSubfileSeekableInputStream
extends SubfileSeekableInputStream

A SubfileSeekableInputStream implementation which can ignore close() method calls.


Field Summary
 
Fields inherited from class com.levigo.jadice.document.io.SeekableInputStream
bitOffset, byteOrder, flushedPos
 
Constructor Summary
UncloseableSubfileSeekableInputStream(SeekableInputStream stream, long start, long length)
          Creates an uncloseable seekable stream part access.
UncloseableSubfileSeekableInputStream(SeekableInputStream stream, long start, long length, boolean propagateClose)
          Creates an uncloseable seekable stream part access.
 
Method Summary
 void close()
          Closes this seekable input stream.
 
Methods inherited from class com.levigo.jadice.document.io.SubfileSeekableInputStream
doPropagateClose, getReadAhead, getSizeEstimate, getStreamPosition, length, read, read, seek, setReadAhead
 
Methods inherited from class com.levigo.jadice.document.io.SeekableInputStream
checkClosed, finalize, flush, flushBefore, getBitOffset, getByteOrder, getFlushedPosition, isCached, isCachedFile, isCachedMemory, mark, mark, read, readBit, readBits, readBoolean, readByte, readBytes, readChar, readDouble, readFloat, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readFully, readInt, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedInt, readUnsignedInt, readUnsignedShort, readUTF, reset, resetToInitialState, setBitOffset, setByteOrder, skip, skipBytes, skipBytes
 
Methods inherited from class java.io.InputStream
available, markSupported
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UncloseableSubfileSeekableInputStream

public UncloseableSubfileSeekableInputStream(SeekableInputStream stream,
                                             long start,
                                             long length,
                                             boolean propagateClose)
Creates an uncloseable seekable stream part access. Depending on the propagateClose parameter close() method calls will be ignored or not.

Parameters:
stream - the origin SeekableInputStream
start - the start offset of the partial view in the origin stream
length - the length of the partial view to be read of the origin stream
propagateClose, - set to true calls of the close() will be forwarded to the origin stream, false a call of the close() will be ignored.

UncloseableSubfileSeekableInputStream

public UncloseableSubfileSeekableInputStream(SeekableInputStream stream,
                                             long start,
                                             long length)
Creates an uncloseable seekable stream part access. Any close() method calls will be ignored.

Parameters:
stream - the origin SeekableInputStream
start - the start offset of the partial view in the origin stream
length - the length of the partial view to be read of the origin stream
Method Detail

close

public void close()
           throws IOException
Description copied from class: SeekableInputStream
Closes this seekable input stream. Further attempts to read from it will throw IOExceptions. Additional attempts to SeekableInputStream.close(), however, have no effect.

Specified by:
close in interface Closeable
Specified by:
close in interface ImageInputStream
Overrides:
close in class SubfileSeekableInputStream
Throws:
IOException
See Also:
InputStream.close()


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.