FileDocCategorySizeDatePackage
MimeMappingDescriptor.javaAPI DocGlassfish v2 API3668Fri May 04 22:31:22 BST 2007None

MimeMappingDescriptor

public class MimeMappingDescriptor extends Object implements Serializable, com.sun.enterprise.deployment.web.MimeMapping
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

Fields Summary
private String
extension
private String
mimeType
Constructors Summary
public MimeMappingDescriptor(MimeMappingDescriptor other)
copy constructor

	// super(other);
	extension = other.extension;
	mimeType = other.mimeType;
    
public MimeMappingDescriptor(String extension, String mimeType)
Construct the mapping for the given extension to the given mime type.

	this.extension = extension;
	this.mimeType = mimeType;
    
public MimeMappingDescriptor()

    
Methods Summary
public java.lang.StringgetExtension()
Return the filename extension for this mapping.

	if (this.extension == null) {
	    this.extension = "";
	}
	return this.extension;
    
public java.lang.StringgetMimeType()
Get the mime type for this mapping.

	if (this.mimeType == null) {
	    this.mimeType = "";
	}
	return this.mimeType;
    
public voidprint(java.lang.StringBuffer toStringBuffer)
My pretty format.

	toStringBuffer.append("MimeMapping: ").append(this.getExtension()).append("@").append(this.getMimeType());
    
public voidsetExtension(java.lang.String extension)
Set the filename extension for this mapping.

	this.extension = extension;
    
public voidsetMimeType(java.lang.String mimeType)
Set the mime type for this mapping.

	this.mimeType = mimeType;