diff --git a/common/source/java/ch/systemsx/cisd/common/io/HDF5DataSetBasedContent.java b/common/source/java/ch/systemsx/cisd/common/io/HDF5DataSetBasedContent.java index 116c471dbc0c77584431fbaf420de895102200e2..72baa0344d3b1c973432080bfaebd0c085517650 100644 --- a/common/source/java/ch/systemsx/cisd/common/io/HDF5DataSetBasedContent.java +++ b/common/source/java/ch/systemsx/cisd/common/io/HDF5DataSetBasedContent.java @@ -16,11 +16,8 @@ package ch.systemsx.cisd.common.io; -import java.io.Closeable; import java.io.File; import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; import ch.systemsx.cisd.base.io.AdapterIInputStreamToInputStream; import ch.systemsx.cisd.base.io.IRandomAccessFile; @@ -34,7 +31,7 @@ import ch.systemsx.cisd.hdf5.io.HDF5DataSetRandomAccessFile; * * @author Bernd Rinn */ -public class HDF5DataSetBasedContent implements IContent, Closeable +public class HDF5DataSetBasedContent implements IContent { private final File hdf5File; @@ -46,8 +43,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable private final long size; - private final List<HDF5DataSetRandomAccessFile> randomAccessFiles; - public HDF5DataSetBasedContent(File hdf5File, String dataSetPath) { this.hdf5File = hdf5File; @@ -64,7 +59,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable this.size = 0L; } reader.close(); - this.randomAccessFiles = new ArrayList<HDF5DataSetRandomAccessFile>(); } public String tryGetName() @@ -86,7 +80,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable { final HDF5DataSetRandomAccessFile randomAccessFile = HDF5DataSetRandomAccessFile.createForReading(hdf5File, dataSetPath); - randomAccessFiles.add(randomAccessFile); return randomAccessFile; } @@ -95,12 +88,4 @@ public class HDF5DataSetBasedContent implements IContent, Closeable return new AdapterIInputStreamToInputStream(getReadOnlyRandomAccessFile()); } - public void close() - { - for (HDF5DataSetRandomAccessFile raFile : randomAccessFiles) - { - raFile.close(); - } - } - }