Class MimeMappingDescriptor
- java.lang.Object
-
- org.glassfish.web.deployment.descriptor.MimeMappingDescriptor
-
- All Implemented Interfaces:
MimeMapping,Serializable
public class MimeMappingDescriptor extends Object implements MimeMapping, Serializable
I represent a mapping between a mime type and a file extension for specifiying how to handle mime types in a J2EE WAR.- Author:
- Danny Coward
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MimeMappingDescriptor()MimeMappingDescriptor(String extension, String mimeType)Construct the mapping for the given extension to the given mime type.MimeMappingDescriptor(MimeMappingDescriptor other)copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExtension()Return the filename extension for this mapping.StringgetMimeType()Get the mime type for this mapping.voidprint(StringBuilder toStringBuilder)My pretty format.voidsetExtension(String extension)Set the filename extension for this mapping.voidsetMimeType(String mimeType)Set the mime type for this mapping.
-
-
-
Constructor Detail
-
MimeMappingDescriptor
public MimeMappingDescriptor(MimeMappingDescriptor other)
copy constructor
-
MimeMappingDescriptor
public MimeMappingDescriptor(String extension, String mimeType)
Construct the mapping for the given extension to the given mime type.
-
MimeMappingDescriptor
public MimeMappingDescriptor()
-
-
Method Detail
-
getExtension
public String getExtension()
Return the filename extension for this mapping.- Specified by:
getExtensionin interfaceMimeMapping
-
setExtension
public void setExtension(String extension)
Set the filename extension for this mapping.- Specified by:
setExtensionin interfaceMimeMapping
-
getMimeType
public String getMimeType()
Get the mime type for this mapping.- Specified by:
getMimeTypein interfaceMimeMapping
-
setMimeType
public void setMimeType(String mimeType)
Set the mime type for this mapping.- Specified by:
setMimeTypein interfaceMimeMapping
-
print
public void print(StringBuilder toStringBuilder)
My pretty format.
-
-