framearrayattribute.java

来自「很棒的web服务器源代码」· Java 代码 · 共 55 行

JAVA
55
字号
// FrameArrayAttribute.java// $Id: FrameArrayAttribute.java,v 1.4 2000/08/16 21:37:55 ylafon Exp $// (c) COPYRIGHT MIT and INRIA, 1996.// Please first read the full copyright statement in file COPYRIGHT.htmlpackage org.w3c.tools.resources.upgrade ;import java.io.DataInputStream;import java.io.DataOutputStream;import java.io.IOException;import org.w3c.tools.resources.ResourceFrame;import org.w3c.tools.resources.UnknownFrame;public class FrameArrayAttribute extends Attribute {    public boolean checkValue(Object value) {	return value instanceof ResourceFrame[];    }    public int getPickleLength(Object value) {	throw new RuntimeException("unused for upgrade");    }    public void pickle(DataOutputStream out, Object obj)	throws IOException    {	throw new RuntimeException("unused for upgrade");    }    public Object unpickle(DataInputStream in) 	throws IOException    {	int cnt = in.readInt();	if ( cnt == 0 )	    return null;	ResourceFrame frames[] = new ResourceFrame[cnt]; 	for (int i = 0 ; i < cnt ; i++) {	    try {		frames[i] = (ResourceFrame) Upgrader.readResource(in);	    } catch (UpgradeException ex) {		frames[i] = new UnknownFrame();	    }	}	return frames;    }    public FrameArrayAttribute(String name, ResourceFrame def[],                               Integer flags) {	super(name, def, flags);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?