📄 mimetypeattribute.java
字号:
// MimeTypeAttribute.java// $Id: MimeTypeAttribute.java,v 1.5 2002/06/09 11:26:17 ylafon Exp $// (c) COPYRIGHT MIT and INRIA, 1996.// Please first read the full copyright statement in file COPYRIGHT.htmlpackage org.w3c.jigsaw.frames ;import org.w3c.tools.resources.Attribute;import org.w3c.tools.resources.SimpleAttribute;import org.w3c.www.mime.MimeType;import org.w3c.www.mime.MimeTypeFormatException;/** * The generic class of Mime type attributes. */public class MimeTypeAttribute extends SimpleAttribute { /** * Is the given object a valid MimeTypeAttribute value ? * @param obj The object to test. * @return A boolean <strong>true</strong> if okay. */ public boolean checkValue(Object obj) { return (obj instanceof MimeType) || (obj == null) ; } public String pickle(Object obj) { return ((MimeType)obj).toString(); } public Object unpickle (String value) { try { return new MimeType(value); } catch (MimeTypeFormatException ex) { return null; } } public MimeTypeAttribute(String name, Object def, int flags) { super(name, def, flags) ; this.type = "org.w3c.www.mime.MimeType".intern(); } public MimeTypeAttribute() { super() ; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -