author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Fri, 03 Apr 2020 16:32:36 +0200 | |
changeset 416 | 9ed8788a1a4e |
permissions | -rw-r--r-- |
jtulach@135 | 1 |
package org.apidesign.unionfs; |
jtulach@135 | 2 |
|
jtulach@135 | 3 |
import java.net.URL; |
jtulach@135 | 4 |
import org.openide.filesystems.FileSystem; |
jtulach@135 | 5 |
import org.openide.filesystems.MultiFileSystem; |
jtulach@135 | 6 |
import org.openide.filesystems.XMLFileSystem; |
jtulach@135 | 7 |
import org.xml.sax.SAXException; |
jtulach@135 | 8 |
|
jtulach@135 | 9 |
public final class UnionFS { |
jtulach@135 | 10 |
private UnionFS() { |
jtulach@135 | 11 |
} |
jtulach@135 | 12 |
|
jtulach@135 | 13 |
public static FileSystem union(FileSystem... toUnion) { |
jtulach@135 | 14 |
return new MultiFileSystem(toUnion); |
jtulach@135 | 15 |
} |
jtulach@135 | 16 |
|
jtulach@135 | 17 |
public static FileSystem fromResource(URL stream) throws SAXException { |
jtulach@135 | 18 |
return new XMLFileSystem(stream); |
jtulach@135 | 19 |
} |
jtulach@135 | 20 |
} |