1 23 package com.sun.enterprise.deployment; 24 25 import com.sun.enterprise.deployment.web.MimeMapping; 26 import java.io.Serializable ; 27 28 32 33 public class MimeMappingDescriptor implements MimeMapping, Serializable { 34 private String extension; 35 private String mimeType; 36 37 38 public MimeMappingDescriptor(MimeMappingDescriptor other) { 39 extension = other.extension; 41 mimeType = other.mimeType; 42 } 43 44 45 public MimeMappingDescriptor(String extension, String mimeType) { 46 this.extension = extension; 47 this.mimeType = mimeType; 48 } 49 50 51 public MimeMappingDescriptor() { 52 } 53 54 55 public String getExtension() { 56 if (this.extension == null) { 57 this.extension = ""; 58 } 59 return this.extension; 60 } 61 62 63 public void setExtension(String extension) { 64 this.extension = extension; 65 } 66 67 68 public String getMimeType() { 69 if (this.mimeType == null) { 70 this.mimeType = ""; 71 } 72 return this.mimeType; 73 } 74 75 public void setMimeType(String mimeType) { 76 this.mimeType = mimeType; 77 } 78 79 public void print(StringBuffer toStringBuffer) { 80 toStringBuffer.append("MimeMapping: ").append(this.getExtension()).append("@").append(this.getMimeType()); 81 } 82 83 } 84 | Popular Tags |