|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.share.ContentManager
The ContentManager is used to manage local shared content for a peer.
Constructor Summary | |
ContentManager()
|
Method Summary | |
abstract Content[] |
getContent()
Returns an array of all the shared content. |
abstract Content[] |
getContent(ContentFilter filter)
Returns an array of all the shared content accepted by the specified content filter. |
abstract Content[] |
getContent(ContentId id)
Returns an array of all the shared content with the specified content id. |
abstract java.lang.String |
getMimeType(java.io.File file)
Returns the mime type for the specified file, or null if unknown. |
FileContent |
share(java.io.File file)
Shares the specified file using the file name as the share name and a default mime type based on the file name. |
FileContent |
share(java.io.File file,
java.lang.String desc)
Shares the specified file with a description. |
abstract FileContent |
share(java.io.File file,
java.lang.String name,
java.lang.String type,
java.lang.String desc)
Shares the specified file with the provided content name, type, and description. |
abstract void |
unshare(Content c)
Removes the specified Content from the list of shared content. |
abstract void |
unshare(ContentAdvertisement cAdv)
Removes the specified Content from the list of shared content. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ContentManager()
Method Detail |
public FileContent share(java.io.File file) throws java.io.IOException
file
- the File to be sharedpublic FileContent share(java.io.File file, java.lang.String desc) throws java.io.IOException
file
- the File to be shareddesc
- the description of the contentpublic abstract FileContent share(java.io.File file, java.lang.String name, java.lang.String type, java.lang.String desc) throws java.io.IOException
file
- the File to be sharedname
- the share name, or null if file name should be usedtype
- the content type, or null if nonedesc
- the content description, or null if nonepublic abstract void unshare(Content c) throws java.io.IOException
c
- the Content to be unsharedpublic abstract void unshare(ContentAdvertisement cAdv) throws java.io.IOException
cAdv
- Content Advertisement of the content to be unsharedpublic abstract Content[] getContent()
public abstract Content[] getContent(ContentId id)
id
- the ContentId of the shared contentpublic abstract Content[] getContent(ContentFilter filter)
filter
- the ContentFilter to use for search shared contentpublic abstract java.lang.String getMimeType(java.io.File file)
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |