|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.share.MimeTable
This class is used to map file extensions to their corresponding MimeInfo objects.
Constructor Summary | |
MimeTable()
Creates a new empty MimeTable. |
Method Summary | |
boolean |
contains(java.lang.String type)
Returns true if this mime table contains information for the specific mime type. |
MimeInfo |
get(java.lang.String type)
Returns the MimeInfo object for the specified mime type, or null if not found. |
MimeInfo[] |
getAll()
Returns an array of all the MimeInfo objects in this table. |
java.lang.String |
getBrowserApplication()
Returns the browser application launch string or null if none. |
java.lang.String[] |
getBrowserCmdArray(java.lang.String arg)
Returns an array of strings that can be used to launch the browser for the specified argument using Runtime.exec(). |
static java.lang.String[] |
getCommandArray(java.lang.String cmd,
java.lang.String arg)
Parses the specified command string into an array of strings appropriate for use with Runtime.exec(). |
static MimeTable |
getDefaultMimeTable()
Returns default, platform-independent MimeTable. |
MimeInfo |
getForName(java.lang.String name)
Returns the MimeInfo for the specified file name, or null if not found. |
void |
load(java.io.InputStream is)
Loads mime types from the specified input stream. |
void |
put(MimeInfo mi)
Adds a new MimeInfo object to the table, replacing any previous mapping for the mime type. |
void |
remove(java.lang.String type)
Removes MimeInfo object corresponding to specified mime type. |
void |
save(java.io.OutputStream os)
Saves this MimeTable to the specified output stream. |
void |
setBrowserApplication(java.lang.String browser)
Sets the browser application launch string. |
int |
size()
Returns the number of MimeInfo objects stored in this table. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MimeTable()
Method Detail |
public static MimeTable getDefaultMimeTable()
public MimeInfo get(java.lang.String type)
public MimeInfo[] getAll()
public boolean contains(java.lang.String type)
public void put(MimeInfo mi)
public void remove(java.lang.String type)
public int size()
public MimeInfo getForName(java.lang.String name)
public void load(java.io.InputStream is) throws java.io.IOException
public void save(java.io.OutputStream os) throws java.io.IOException
public java.lang.String getBrowserApplication()
public void setBrowserApplication(java.lang.String browser)
public java.lang.String[] getBrowserCmdArray(java.lang.String arg)
public static java.lang.String[] getCommandArray(java.lang.String cmd, java.lang.String arg)
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |