Index: H2SpatialExplorer.java
===================================================================
--- H2SpatialExplorer.java	(revision 44188)
+++ H2SpatialExplorer.java	(revision 44189)
@@ -1,20 +1,7 @@
 package org.gvsig.fmap.dal.store.h2;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.HashMap;
-import java.util.Map;
 import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOUtils;
 import org.gvsig.fmap.dal.DataStore;
 import org.gvsig.fmap.dal.exception.DataException;
 import org.gvsig.fmap.dal.exception.InitializeException;
@@ -29,114 +16,7 @@
  */
 @SuppressWarnings("UseSpecificCatch")
 public class H2SpatialExplorer extends JDBCServerExplorerBase {
-    
-    private class H2Resource implements DataResource {
-
-        private final File zipFile;
-        private final String tableName;
-        private InputStream in;
-        private ByteArrayOutputStream out;
-        private FileSystem fs;
         
-        public H2Resource(File zipFile, String tableName) {
-            this.zipFile = zipFile;
-            this.tableName = tableName;
-        }
-
-        @Override
-        public boolean exists() {
-            if( !this.zipFile.exists() ) {
-                return false;
-            }
-            try {
-                Map<String, String> attributes = new HashMap<>();
-                attributes.put("create", "false");
-                URI zipURI = new URI("zip:"+this.zipFile.toURI().toString());
-                this.fs = FileSystems.newFileSystem(zipURI, attributes);
-                Path tablePath = fs.getPath(this.tableName);
-                if( tablePath==null ) {
-                    IOUtils.closeQuietly(fs);
-                    this.fs = null;
-                    return false;
-                }
-                return true;
-                
-            } catch(Exception ex) {
-                IOUtils.closeQuietly(fs);
-                this.fs = null;
-                return false;
-            }
-        }
-
-        @Override
-        public InputStream asInputStream() throws IOException {
-            if( !this.zipFile.exists()) {
-                return null;
-            }
-            if( this.in!=null || this.out!=null ) {
-                throw new IllegalStateException("Resource is already open ("+this.zipFile.toString()+"!"+this.tableName+")");
-            }
-            try {
-                Map<String, String> attributes = new HashMap<>();
-                attributes.put("create", "false");
-                URI zipURI = new URI("zip:"+this.zipFile.toURI().toString());
-                this.fs = FileSystems.newFileSystem(zipURI, attributes);
-                Path tablePath = fs.getPath(this.tableName);
-                if( tablePath==null ) {
-                    IOUtils.closeQuietly(fs);
-                    this.fs = null;
-                    return null;
-                }
-                this.in = Files.newInputStream(tablePath);
-                return this.in;
-                
-            } catch(Exception ex) {
-                IOUtils.closeQuietly(fs);
-                this.fs = null;
-                return null;
-            }
-        }
-
-        @Override
-        public OutputStream asOutputStream() throws IOException {
-            if( !this.zipFile.exists() ) {
-                return null;
-            }
-            if( this.in!=null || this.out!=null ) {
-                throw new IllegalStateException("Resource is already open ("+this.zipFile.toString()+"!"+this.tableName+")");
-            }
-            this.out = new ByteArrayOutputStream();
-            return this.out;
-        }
-
-        @Override
-        public void close() {
-            if( this.in!=null ) {
-                IOUtils.closeQuietly(this.in);
-                this.in = null;
-            }
-            if(this.out != null ) {
-                try {
-                    Map<String, String> attributes = new HashMap<>();
-                    attributes.put("create", "true");
-                    URI zipURI = new URI("zip:"+this.zipFile.toURI().toString());
-                    this.fs = FileSystems.newFileSystem(zipURI, attributes);
-                    Path tablePath = fs.getPath(this.tableName);
-                    ByteArrayInputStream lin = new ByteArrayInputStream(this.out.toByteArray());
-                    Files.copy(lin, tablePath);
-
-                } catch(Exception ex) {
-                    IOUtils.closeQuietly(this.out);
-                    this.out = null;
-                }
-            }
-            if( this.fs!=null ) {
-                IOUtils.closeQuietly(this.fs);
-                this.fs = null;
-            }
-        }
-    }
-    
     public H2SpatialExplorer(JDBCServerExplorerParameters parameters, DataServerExplorerProviderServices services, JDBCHelper helper) throws InitializeException {
         super(parameters, services, helper);
     }
@@ -151,7 +31,7 @@
         String zipPath = this.getParameters().getFile().getAbsolutePath();
         zipPath = FilenameUtils.removeExtension(zipPath);
         zipPath = zipPath + "." + resourceName;
-        H2Resource resource = new H2Resource(new File(zipPath), dataStore.getName());
+        H2SpatialResource resource = new H2SpatialResource(new File(zipPath), dataStore.getName());
         return resource;
     }
     
