java.io.Serializable, AbstractFileSystem.Attr, AbstractFileSystem.Change, AbstractFileSystem.Info, AbstractFileSystem.Listpublic static class XMLFileSystem.Impl extends java.lang.Object implements AbstractFileSystem.List, AbstractFileSystem.Info, AbstractFileSystem.Change, AbstractFileSystem.Attr
| Constructor | Description |
|---|---|
Impl(XMLFileSystem fs) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Enumeration<java.lang.String> |
attributes(java.lang.String name) |
Get all file attribute names for the file.
|
java.lang.String[] |
children(java.lang.String name) |
Get a list of children files for a given folder.
|
void |
createData(java.lang.String name) |
Create new data file.
|
void |
createFolder(java.lang.String name) |
Create new folder.
|
void |
delete(java.lang.String name) |
Delete a file.
|
void |
deleteAttributes(java.lang.String name) |
Called when a file is deleted, to also delete its attributes.
|
boolean |
folder(java.lang.String name) |
Test if the file is a folder or contains data.
|
java.io.InputStream |
inputStream(java.lang.String name) |
Get input stream.
|
java.util.Date |
lastModified(java.lang.String name) |
Get last modification time.
|
void |
lock(java.lang.String name) |
Lock the file.
|
void |
markUnimportant(java.lang.String name) |
Mark the file as being unimportant.
|
java.lang.String |
mimeType(java.lang.String name) |
Get the MIME type of the file.
|
java.io.OutputStream |
outputStream(java.lang.String name) |
Get output stream.
|
java.lang.Object |
readAttribute(java.lang.String name,
java.lang.String attrName) |
Get the file attribute with the specified name.
|
boolean |
readOnly(java.lang.String name) |
Test whether this file can be written to or not.
|
void |
rename(java.lang.String oldName,
java.lang.String newName) |
Rename a file.
|
void |
renameAttributes(java.lang.String oldName,
java.lang.String newName) |
Called when a file is renamed, to appropriately update its attributes.
|
long |
size(java.lang.String name) |
Get the size of the file.
|
void |
unlock(java.lang.String name) |
Unlock the file.
|
void |
writeAttribute(java.lang.String name,
java.lang.String attrName,
java.lang.Object value) |
Set the file attribute with the specified name.
|
public Impl(XMLFileSystem fs)
fs - the filesystem to delegate topublic java.lang.String[] children(java.lang.String name)
AbstractFileSystem.Listchildren in interface AbstractFileSystem.Listname - the folder, by name; e.g. top/next/afterthatfile.ext (no path)
the array can contain null values that will be ignoredpublic void createFolder(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.ChangecreateFolder in interface AbstractFileSystem.Changename - full name of new folder, e.g. topfolder/newfolderjava.io.IOException - if the operation failspublic void createData(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.ChangecreateData in interface AbstractFileSystem.Changename - full name of the file, e.g. path/from/root/filename.extjava.io.IOException - if the file cannot be created (e.g. already exists)public void rename(java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException
AbstractFileSystem.Changerename in interface AbstractFileSystem.ChangeoldName - old name of the file; fully qualifiednewName - new name of the file; fully qualifiedjava.io.IOException - if it could not be renamedpublic void delete(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.Changedelete in interface AbstractFileSystem.Changename - name of file; fully qualifiedjava.io.IOException - if the file could not be deletedpublic java.util.Date lastModified(java.lang.String name)
AbstractFileSystem.InfolastModified in interface AbstractFileSystem.Infoname - the file to testpublic boolean folder(java.lang.String name)
AbstractFileSystem.Infofolder in interface AbstractFileSystem.Infoname - name of the filetrue if the file is folder, false if it is datapublic boolean readOnly(java.lang.String name)
AbstractFileSystem.InforeadOnly in interface AbstractFileSystem.Infoname - the file to testtrue if the file is read-onlypublic java.lang.String mimeType(java.lang.String name)
AbstractFileSystem.InfomimeType in interface AbstractFileSystem.Infoname - the file to test"text/plain")
or null if no special support for recognizing MIME is implemented.public long size(java.lang.String name)
AbstractFileSystem.Infosize in interface AbstractFileSystem.Infoname - the file to testpublic java.io.InputStream inputStream(java.lang.String name)
throws java.io.FileNotFoundException
AbstractFileSystem.InfoinputStream in interface AbstractFileSystem.Infoname - the file to testjava.io.FileNotFoundException - if the file does not exist or is invalidpublic java.io.OutputStream outputStream(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.InfooutputStream in interface AbstractFileSystem.Infoname - the file to testjava.io.IOException - if an error occurs (the file is invalid, etc.)public void lock(java.lang.String name)
throws java.io.IOException
AbstractFileSystem.InfoFileLock within NetBeans, however.lock in interface AbstractFileSystem.Infoname - name of the filejava.io.IOException - (e.g. FileAlreadyLockedException) if the file is already locked or otherwise cannot be lockedpublic void unlock(java.lang.String name)
AbstractFileSystem.Infounlock in interface AbstractFileSystem.Infoname - name of the filepublic void markUnimportant(java.lang.String name)
AbstractFileSystem.InfomarkUnimportant in interface AbstractFileSystem.Infoname - the file to markpublic java.lang.Object readAttribute(java.lang.String name,
java.lang.String attrName)
AbstractFileSystem.AttrreadAttribute in interface AbstractFileSystem.Attrname - the fileattrName - name of the attributenull if the attribute is unset (or could not be properly restored for some reason)public void writeAttribute(java.lang.String name,
java.lang.String attrName,
java.lang.Object value)
throws java.io.IOException
AbstractFileSystem.AttrwriteAttribute in interface AbstractFileSystem.Attrname - the fileattrName - name of the attributevalue - new value or null to clear the attribute. Must be serializable, although particular filesystems may or may not use serialization to store attribute values.java.io.IOException - if the attribute cannot be set. If serialization is used to store it, this may in fact be a subclass such as NotSerializableException.public java.util.Enumeration<java.lang.String> attributes(java.lang.String name)
AbstractFileSystem.Attrattributes in interface AbstractFileSystem.Attrname - the filepublic void renameAttributes(java.lang.String oldName,
java.lang.String newName)
AbstractFileSystem.AttrrenameAttributes in interface AbstractFileSystem.AttroldName - old name of the filenewName - new name of the filepublic void deleteAttributes(java.lang.String name)
AbstractFileSystem.AttrdeleteAttributes in interface AbstractFileSystem.Attrname - name of the fileBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.