org.vrspace.vfs
Class FileManager
java.lang.Object
org.vrspace.vfs.FileManager
- public class FileManager
- extends java.lang.Object
Field Summary |
protected DB |
db
|
java.lang.String |
docBase
|
protected Cache |
filez
this needs to be memory-sensitive cache (org.vrspace.util.Cache) |
protected Server |
server
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
server
protected Server server
db
protected DB db
docBase
public java.lang.String docBase
filez
protected Cache filez
- this needs to be memory-sensitive cache (org.vrspace.util.Cache)
FileManager
public FileManager(Server server,
DB db)
contains
public boolean contains(java.lang.String url)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
contains
public boolean contains(Location loc)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
getLocalCopy
public java.net.URL getLocalCopy(Location loc)
throws java.lang.Exception
- Return URL of local document copy. If no copy is available tries to fetch one.
- Throws:
java.lang.Exception
getLocalURL
public java.net.URL getLocalURL(java.lang.String url)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
getLocalURL
public java.net.URL getLocalURL(Location loc)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException
getFile
public java.io.File getFile(Location loc)
store
public void store(java.lang.String url)
throws java.lang.Exception
- Fetch remote file and store it to local repository
- Throws:
java.lang.Exception
store
public void store(Location loc)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
store
public void store(Location loc,
java.io.InputStream in)
throws java.io.IOException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
java.io.FileNotFoundException
getLocation
public Location getLocation(java.lang.String url)
throws java.net.MalformedURLException
- Throws:
java.net.MalformedURLException