| Constructor and Description |
|---|
URLFileSystemStorage(java.net.URL url)
Initializes this storage
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this Storage after reading or writing.
|
Storage |
create(java.lang.String name)
If this is a directory Storage, create a new file URLFileSystemStorage child
of that directory
|
Storage |
createDir(java.lang.String name)
If this is a directory Storage, create a new directory URLFileSystemStorage
child of that directory
|
java.lang.String |
getCanonicalPath()
Get the canonical path name of this Storage
|
java.lang.String |
getName()
Get the short name of this Storage
|
java.lang.String |
getPath()
Get the path of this Storage
|
java.lang.Object |
getProperty(java.lang.String property)
Get the value associated with the incoming property name
as defined in this Storage
|
java.net.URL |
getURL()
Get the URL of this object.
|
boolean |
isDirectory()
Determine if this is a directory Storage
|
boolean |
isInJar()
Determine if this Storage is in a jar
|
java.lang.String[] |
list()
If this Storage is a directory, list the paths of all
children of that directory.
|
java.util.ArrayList |
listStorage()
If this Storage is a directory, list all the children
of that directory as Storages
|
long |
modDate()
Get the last modification date of this Storage
|
void |
open()
If this is a file Storage, open this Storage for reading or writing.
|
Storage |
open(java.lang.String name)
If this Storage is a directory, find the child with the incoming
name of that directory and return it as a Storage.
|
byte[] |
read()
Read as many bytes as possible from this Storage.
|
int |
read(byte[] buf)
Read as many bytes as possible from this Storage up to the
size of buf.
|
void |
setProperty(java.lang.String property,
java.lang.Object value)
Set the value of a property in this Storage
|
int |
size()
Get the size of this Storage if it's a file URL Storage
|
void |
write(byte[] buf,
int start,
int len)
Write bytes to this Storage.
|
public URLFileSystemStorage(java.net.URL url)
url - A non-null URL, which can be either a directory URL
or a File URLpublic java.net.URL getURL()
public java.lang.String getName()
getName in interface StorageURLFileSystem.getFileName(URL)public java.lang.String getPath()
getPath in interface StorageURLFileSystem.getPath(URL)public java.lang.String getCanonicalPath()
getCanonicalPath in interface StorageURLFileSystem.canonicalize(URL)public long modDate()
modDate in interface StorageURLFileSystem.lastModified(URL)public boolean isDirectory()
isDirectory in interface StorageURLFileSystem.isDirectory(URL)public boolean isInJar()
isInJar in interface StorageJarUtil.isJarURL(URL)public java.lang.Object getProperty(java.lang.String property)
getProperty in interface Storageproperty - A namesetProperty(String, Object)public void setProperty(java.lang.String property,
java.lang.Object value)
setProperty in interface Storageproperty - A namevalue - A valuegetProperty(String)public int size()
size in interface StorageURLFileSystem.getLength(URL)public byte[] read()
throws java.io.IOException
public int read(byte[] buf)
throws java.io.IOException
public void write(byte[] buf,
int start,
int len)
throws java.io.IOException
public java.lang.String[] list()
public java.util.ArrayList listStorage()
listStorage in interface Storagepublic void open()
throws java.io.IOException
public Storage open(java.lang.String name)
public Storage create(java.lang.String name)
public Storage createDir(java.lang.String name)