All Packages Class Hierarchy This Package Previous Next Index
Attention: A Medium is not a drive. If a disk is ejected out of a disk drive and another one is inserted, this second disk has to be modeled by a new Medium instance!
All implementations of this interface must be thread-safe!
Changes 3-2-98: changed references to EjectionVetoException into VetoException
"Remount" can also mean "reestablish a connection", e.g.
eject() should perform the following steps:
true from now on
If it doesn't throw an IOException, it was successful and the medium is accessible again.
Attention: The medium contents may have changed.
public static final int READONLY
public static final int REMOVABLE
public static final int REMOVABLE_WITHOUT_NOTIFICATION
public static final int REMOUNTABLE
"Remount" can also mean "reestablish a connection", e.g. a FTP connection that broke down because of a timeout.
public abstract int getFlags()
public abstract long getSize()
public abstract void readBytes(long ofs,
byte[] buf,
int bOfs,
int count) throws IOException, MediumRemovedException, IllegalArgumentException
public abstract void writeBytes(long ofs,
byte[] buf,
int bOfs,
int count) throws IOException, MediumRemovedException, IllegalArgumentException, UnsupportedFeatureException
public abstract void flush() throws IOException
public abstract void eject() throws MediumRemovedException, VetoException, IOException, UnsupportedFeatureException
eject() should perform the following steps:
true from now on
public abstract void remount() throws IOException, UnsupportedFeatureException
If it doesn't throw an IOException, it was successful and the medium is accessible again.
Attention: The medium contents may have changed. (Size and flags don't change, however.)
public abstract boolean isRemoved()
public abstract void addMediumListener(MediumListener l)
public abstract void removeMediumListener(MediumListener l)
All Packages Class Hierarchy This Package Previous Next Index