JXTA

net.jxta.share
Class MimeInfo

java.lang.Object
  |
  +--net.jxta.share.MimeInfo

public class MimeInfo
extends java.lang.Object

The MimeInfo class represents information about a specific mime type.


Constructor Summary
MimeInfo(java.lang.String type)
          Creates a new MimeInfo object for the specified mime type.
 
Method Summary
 java.lang.String getAction()
          Returns the default action for this mime type, or null if none.
 java.lang.String getApplication()
          Returns the application launcher string for this mime type.
 java.lang.String[] getApplicationCmdArray(java.lang.String arg)
          Returns an array of strings that can be used with Runtime.exec() in order to launch the application appropriate for this mime type.
 java.lang.String getDescription()
          Returns the description for this mime type, or null if none.
 java.lang.String[] getFileExtensions()
          Returns the list of file extensions for this mime type, or null if none.
 java.lang.String getIcon()
          Returns the icon name for this mime type, or null if none.
 java.lang.String getType()
          Returns the major type for this mime type.
 void setAction(java.lang.String action)
          Sets the default action for this mime type.
 void setApplication(java.lang.String app)
          Sets the application launcher string for this mime type.
 void setDescription(java.lang.String desc)
          Sets the description for this mime type.
 void setFileExtensions(java.lang.String[] exts)
          Sets the list of file extensions for this mime type.
 void setIcon(java.lang.String icon)
          Sets the icon name for this mime type.
 java.lang.String toString()
          Returns a string representation of the mime type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MimeInfo

public MimeInfo(java.lang.String type)
Creates a new MimeInfo object for the specified mime type.
Method Detail

getType

public java.lang.String getType()
Returns the major type for this mime type.

setDescription

public void setDescription(java.lang.String desc)
Sets the description for this mime type.

getDescription

public java.lang.String getDescription()
Returns the description for this mime type, or null if none.

setFileExtensions

public void setFileExtensions(java.lang.String[] exts)
Sets the list of file extensions for this mime type. Each extension must begin with a '.' character.

getFileExtensions

public java.lang.String[] getFileExtensions()
Returns the list of file extensions for this mime type, or null if none.

setAction

public void setAction(java.lang.String action)
Sets the default action for this mime type.

getAction

public java.lang.String getAction()
Returns the default action for this mime type, or null if none.

setIcon

public void setIcon(java.lang.String icon)
Sets the icon name for this mime type.

getIcon

public java.lang.String getIcon()
Returns the icon name for this mime type, or null if none.

setApplication

public void setApplication(java.lang.String app)
Sets the application launcher string for this mime type.

getApplication

public java.lang.String getApplication()
Returns the application launcher string for this mime type.

getApplicationCmdArray

public java.lang.String[] getApplicationCmdArray(java.lang.String arg)
Returns an array of strings that can be used with Runtime.exec() in order to launch the application appropriate for this mime type. The specified argument will be supplied to the application.
See Also:
MimeTable.getCommandArray()

toString

public java.lang.String toString()
Returns a string representation of the mime type.
Overrides:
toString in class java.lang.Object

JXTA