org.dspace.content.packager
Class PackageUtils.UnclosableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.dspace.content.packager.PackageUtils.UnclosableInputStream
- All Implemented Interfaces:
- Closeable
- Enclosing class:
- PackageUtils
public static class PackageUtils.UnclosableInputStream
- extends FilterInputStream
Stream wrapper that does not allow its wrapped stream to be
closed. This is needed to work around problem when loading
bitstreams from ZipInputStream. The Bitstream constructor
invokes close() on the input stream, which would prematurely end
the ZipInputStream.
Example:
ZipEntry ze = zip.getNextEntry();
Bitstream bs = bundle.createBitstream(new PackageUtils.UnclosableInputStream(zipInput));
|
Method Summary |
void |
close()
Do nothing, to prevent wrapped stream from being closed prematurely. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackageUtils.UnclosableInputStream
public PackageUtils.UnclosableInputStream(InputStream in)
close
public void close()
- Do nothing, to prevent wrapped stream from being closed prematurely.
- Specified by:
close in interface Closeable- Overrides:
close in class FilterInputStream
Copyright © 2008 The DSpace Foundation. All Rights Reserved.