|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.biffle.cliff.pearl.PearlTCPConnection
|
+--org.biffle.cliff.pearl2.Pearl2TCPConnection
A wrapper for PearlTCPConnection that provides the Pearl2Connection level of functionality, including data caching/validation, progress and authentication handlers, and simplified file transfer.
| Field Summary |
| Fields inherited from class org.biffle.cliff.pearl.PearlTCPConnection |
AUTHENTICATE, authenticated, BUSY, DELETE_FILE, GET_ALL_FILE_INFO, GET_DATABASE_LOCK, GET_DEVICE_INFO, GET_DEVICE_SETTINGS, GET_FILE_INFO, GET_SALT, GET_STORAGE_INFO, NAK, PROTOCOL_VERSION, READ, readLock, RELEASE_DATABASE_LOCK, saki, SET_FILE_INFO, signature, WRITE, writeLock |
| Constructor Summary | |
Pearl2TCPConnection(java.net.InetAddress device,
int port)
Creates a new Pearl2TCPConnection to the given device and port. |
|
| Method Summary | |
void |
deleteFile(int fid)
Removes a file from the device. |
FileInfo |
getFileByFID(int fid)
Returns a file by FID, or null if no such FID exists. |
long |
getFileCount()
Returns the number of files available on the device. |
java.util.Iterator |
getFileIterator()
Returns an iterator for the known files. |
int |
getMaxFID()
Returns the highest allocated FID. |
void |
readFile(int fid,
java.io.File dest)
Downloads a file from the device by FID. |
protected void |
requireAuth()
|
void |
setAuthHandler(AuthHandler handler)
Sets the AuthHandler to be used if authentication is required. |
void |
setProgressHandler(ProgressHandler handler)
Sets a library-global ProgressHandler. |
protected void |
validateFileInfoCache()
|
int |
writeFile(java.io.File src)
Writes a local file to the device. |
int |
writeTaxiFile(java.io.File src)
Writes a local file to the device without attempting to interpret the file as a song. |
| Methods inherited from class org.biffle.cliff.pearl.PearlTCPConnection |
authenticate, close, getAllFileInfo, getDeviceInfo, getDeviceSettings, getFileInfo, getMessage, getNullTermString, getStorageInfo, getVersion, isAuthenticated, lockDatabase, readFileChunk, sendMessage, setFileInfo, unlockDatabase, writeFileChunk |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biffle.cliff.pearl2.Pearl2Connection |
close, getDeviceInfo, getDeviceSettings, getStorageInfo, getVersion, isAuthenticated, setFileInfo |
| Constructor Detail |
public Pearl2TCPConnection(java.net.InetAddress device,
int port)
throws java.io.IOException,
PearlException
| Method Detail |
public void setAuthHandler(AuthHandler handler)
Pearl2Connection
setAuthHandler in interface Pearl2Connectionpublic void setProgressHandler(ProgressHandler handler)
Pearl2Connection
setProgressHandler in interface Pearl2Connection
public long getFileCount()
throws PearlException
Pearl2Connection
getFileCount in interface Pearl2ConnectionPearlException
public java.util.Iterator getFileIterator()
throws PearlException
Pearl2Connection
getFileIterator in interface Pearl2ConnectionPearlException
public FileInfo getFileByFID(int fid)
throws PearlException
Pearl2Connection
getFileByFID in interface Pearl2ConnectionPearlException
public int getMaxFID()
throws PearlException
Pearl2Connection
getMaxFID in interface Pearl2ConnectionPearlException
public int writeFile(java.io.File src)
throws PearlException,
java.io.FileNotFoundException,
java.io.IOException
Pearl2Connection
writeFile in interface Pearl2ConnectionPearlException
java.io.FileNotFoundException
java.io.IOException
public int writeTaxiFile(java.io.File src)
throws PearlException,
java.io.FileNotFoundException,
java.io.IOException
Pearl2Connection
writeTaxiFile in interface Pearl2ConnectionPearlException
java.io.FileNotFoundException
java.io.IOException
public void readFile(int fid,
java.io.File dest)
throws PearlException,
java.io.IOException
Pearl2Connection
readFile in interface Pearl2ConnectionPearlException
java.io.IOException
public void deleteFile(int fid)
throws PearlException
Pearl2Connection
deleteFile in interface Pearl2ConnectiondeleteFile in class PearlTCPConnectionPearlException
protected void validateFileInfoCache()
throws PearlException
PearlException
protected void requireAuth()
throws PearlException
PearlException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||