Skip to content
Snippets Groups Projects
Commit 0280f79e authored by brinn's avatar brinn
Browse files

change: doesn't need to implement Closeable

SVN: 20884
parent 8c288c15
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,8 @@ ...@@ -16,11 +16,8 @@
package ch.systemsx.cisd.common.io; package ch.systemsx.cisd.common.io;
import java.io.Closeable;
import java.io.File; import java.io.File;
import java.io.InputStream; 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.AdapterIInputStreamToInputStream;
import ch.systemsx.cisd.base.io.IRandomAccessFile; import ch.systemsx.cisd.base.io.IRandomAccessFile;
...@@ -34,7 +31,7 @@ import ch.systemsx.cisd.hdf5.io.HDF5DataSetRandomAccessFile; ...@@ -34,7 +31,7 @@ import ch.systemsx.cisd.hdf5.io.HDF5DataSetRandomAccessFile;
* *
* @author Bernd Rinn * @author Bernd Rinn
*/ */
public class HDF5DataSetBasedContent implements IContent, Closeable public class HDF5DataSetBasedContent implements IContent
{ {
private final File hdf5File; private final File hdf5File;
...@@ -46,8 +43,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable ...@@ -46,8 +43,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable
private final long size; private final long size;
private final List<HDF5DataSetRandomAccessFile> randomAccessFiles;
public HDF5DataSetBasedContent(File hdf5File, String dataSetPath) public HDF5DataSetBasedContent(File hdf5File, String dataSetPath)
{ {
this.hdf5File = hdf5File; this.hdf5File = hdf5File;
...@@ -64,7 +59,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable ...@@ -64,7 +59,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable
this.size = 0L; this.size = 0L;
} }
reader.close(); reader.close();
this.randomAccessFiles = new ArrayList<HDF5DataSetRandomAccessFile>();
} }
public String tryGetName() public String tryGetName()
...@@ -86,7 +80,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable ...@@ -86,7 +80,6 @@ public class HDF5DataSetBasedContent implements IContent, Closeable
{ {
final HDF5DataSetRandomAccessFile randomAccessFile = final HDF5DataSetRandomAccessFile randomAccessFile =
HDF5DataSetRandomAccessFile.createForReading(hdf5File, dataSetPath); HDF5DataSetRandomAccessFile.createForReading(hdf5File, dataSetPath);
randomAccessFiles.add(randomAccessFile);
return randomAccessFile; return randomAccessFile;
} }
...@@ -95,12 +88,4 @@ public class HDF5DataSetBasedContent implements IContent, Closeable ...@@ -95,12 +88,4 @@ public class HDF5DataSetBasedContent implements IContent, Closeable
return new AdapterIInputStreamToInputStream(getReadOnlyRandomAccessFile()); return new AdapterIInputStreamToInputStream(getReadOnlyRandomAccessFile());
} }
public void close()
{
for (HDF5DataSetRandomAccessFile raFile : randomAccessFiles)
{
raFile.close();
}
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment