01: /*
02: * JFolder, Copyright 2001-2006 Gary Steinmetz
03: *
04: * Distributable under LGPL license.
05: * See terms of license at gnu.org.
06: */
07:
08: package org.jfolder.common.files.memory;
09:
10: //base classes
11: import java.io.ByteArrayOutputStream;
12: import java.io.File;
13: import java.io.IOException;
14: import java.io.InputStream;
15: import java.util.ArrayList;
16: import java.util.HashMap;
17: import java.util.HashSet;
18: import java.util.StringTokenizer;
19: import java.util.zip.ZipEntry;
20: import java.util.zip.ZipInputStream;
21: import java.util.zip.ZipOutputStream;
22:
23: //project specific classes
24: import org.jfolder.common.UnexpectedSystemException;
25: import org.jfolder.common.files.VirtualFileSystemDirectory;
26: import org.jfolder.common.files.VirtualFileSystemHolder;
27: import org.jfolder.common.files.VirtualFileSystemRoot;
28:
29: //other classes
30:
31: class MemoryFileSystemRoot extends MemoryFileSystemHolder implements
32: VirtualFileSystemRoot {
33:
34: private String directoryGuard = null;
35:
36: protected MemoryFileSystemRoot(String inDirectoryGuard) {
37: this .directoryGuard = inDirectoryGuard;
38: }
39:
40: public void zip(ZipOutputStream inZos) throws IOException {
41: super .zip(inZos, DIRECTORY_SEPARATOR);
42: }
43:
44: public void unzip(InputStream inIs) throws IOException {
45: parseZipInfo(inIs, this );
46: }
47:
48: public void copyTo(VirtualFileSystemHolder inFsh) {
49: super.copyTo(inFsh);
50: }
51: }
|