|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccs.cpc.VDevice
public abstract class VDevice
A "virtual device". This can be either a drive (lose32), the filesystem (unix and anybody who isn't recognised) a CDB or a jar/zip file. If the device implements java.util.Comparator, the Browser panels will sort by that comparator rather than using the default; this is used by the ResultsVDevice. This implements Hurlable as a convenience for devices or files that require it - typically this is only for operations that throw asynchronously, and at the time of writing only DiskVFile wipe ops do this.
Constructor Summary | |
---|---|
VDevice(CpCmdr cpc,
ccs.utils.Hurlable hurlable)
Construct a VDevice. |
Method Summary | |
---|---|
ccs.cdb.CDBeeTree |
getCPAIffArchive()
Blatant special-pleading hack, required to avoid excessive latency when streaming large files from CPAs. |
CpCmdr |
getCPC()
|
java.lang.String |
getID()
returns a unique ID. |
abstract java.lang.String |
getName()
returns the device identifier, for listing purposes. |
abstract VFile |
getRoot()
returns root directory |
abstract java.lang.String |
getSeparator()
returns the path element separator. |
abstract char |
getSeparatorChar()
the separator, as a char. |
abstract java.lang.String |
getShortName()
returns the device identifier, for changing directory. |
abstract int |
getStoredPwdPrefixLength()
The length of prefix to remove from a stored pwd (to implement "stateful devices" whereby when you return to a device after leaving it abruptly, you get straight back to the same place) to obtain a path relative to the device root which can then be walked. |
java.lang.String |
getTitlePrefix()
returns the prefix that will appear in the title bar of the browser, before the pwd path. |
abstract VDeviceLister |
getVDL()
returns the object which lists all devices currently available. |
void |
hurl(java.lang.Throwable e)
hurl asynch exceptions this way to have them reported |
boolean |
isNoCopy()
returns whether copy-protection is enforced on this device. |
boolean |
isReal()
Whether this device actually provides storage space for its contents. |
boolean |
isSort()
Whether this device should be sorted automatically: some devices sort / order their own contents instead, and don't want the standard sort. |
protected abstract void |
marshalIDSlug(java.io.DataOutputStream dos)
Every device requires a unique ID. |
abstract void |
umount()
closes the VDevice (to let it be removed from the list). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VDevice(CpCmdr cpc, ccs.utils.Hurlable hurlable)
Method Detail |
---|
public abstract java.lang.String getSeparator()
public abstract char getSeparatorChar()
public abstract VFile getRoot()
public abstract java.lang.String getName()
public java.lang.String getTitlePrefix()
public abstract java.lang.String getShortName()
public abstract int getStoredPwdPrefixLength()
public abstract VDeviceLister getVDL()
public abstract void umount()
public final CpCmdr getCPC()
public final java.lang.String getID()
protected abstract void marshalIDSlug(java.io.DataOutputStream dos) throws java.io.IOException
dos
- The stream to marshal this lot onto. You should only
send as much as you need to identify the device - say, a few hundred
bytes, tops.
java.io.IOException
- if the stream blows up - this shouldn't happen.public boolean isNoCopy()
public void hurl(java.lang.Throwable e)
hurl
in interface ccs.utils.Hurlable
e
- That which happened.public boolean isReal()
public boolean isSort()
public ccs.cdb.CDBeeTree getCPAIffArchive()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |