|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--usb.devices.Rio500
This provides access Rio500 status, and potentially to the full range of functionality supported by this device. It's been created using the Rio500.sourceforge.net resources ... many thanks to the folk there! At this writing, this class exposes roughly the functionality that the rio_stat program provides.
Be very sure to invoke finish()
(if you'll be using the
device again) or close()
(so other drivers can use it), after
you start()
to use the Rio. If you don't, a power cycle of
the player may be needed to recover. Use a finally
clause
to make sure you clean up before you switch to another task. Only
the thread which invokes start
may perform subsequent
operations with this object, until finish
.
Do not use your Rio when its battery indicator is so low that none of the solid segments are showing. It's been seen to behave quite poorly when it's got that little power. You could need to reformat your storage media; some users have even had to have their Rio units replaced by Diamond. (This is evidently a known Rio firmware bug.)
Inner Class Summary | |
static class |
Rio500.Data
This class is a base class that wraps a data buffer; subclasses expose the fields in that data. |
static class |
Rio500.FolderEntry
Exposes the fields desribing a folder. |
static class |
Rio500.MemoryStatus
Exposes the fields of a memory status record. |
static class |
Rio500.SongEntry
Represents the information known about each song. |
Constructor Summary | |
Rio500(Device dev)
Initializes to talk to the specified device. |
Method Summary | |
void |
close()
After you close this object, other drivers can access this particular MP3 player. |
protected void |
finalize()
If you didn't finish and close this device, they'll be done here. |
void |
finish()
When you finish with this object, it can normally be used to play back audio until you start to use it again. |
java.lang.String |
getFirmwareRevision()
Returns the frmware revision of this MP3 player. |
Rio500.FolderEntry[] |
getFolders(boolean external)
Returns an array of the folders in internal or external memory. |
int |
getFreeMemory(boolean external)
Returns the number of bytes of free memory in the player's internal or external memory. |
Rio500.MemoryStatus |
getMemoryStatus(boolean external)
Returns information about the internal or external memory. |
boolean |
hasExternalMemory()
Returns true if a removable SmartMedia memory card is available for song storage. |
void |
start()
You must say you are going to start talking to the player, since it can't be used while your thread is doing so. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Rio500(Device dev) throws java.io.IOException
Method Detail |
protected void finalize() throws java.io.IOException
finalize
in class java.lang.Object
public void close() throws java.io.IOException
public void start() throws java.io.IOException
public void finish()
public int getFreeMemory(boolean external) throws java.io.IOException
public java.lang.String getFirmwareRevision() throws java.io.IOException
public boolean hasExternalMemory() throws java.io.IOException
public Rio500.MemoryStatus getMemoryStatus(boolean external) throws java.io.IOException
external
- when true, the external memory is checked.public Rio500.FolderEntry[] getFolders(boolean external) throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |