⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agletimagedata.java

📁 aglet的部分源码
💻 JAVA
字号:
package com.ibm.aglets;/* * @(#)AgletImageData.java *  * IBM Confidential-Restricted *  * OCO Source Materials *  * 03L7246 (c) Copyright IBM Corp. 1996, 1998 *  * The source code for this program is not published or otherwise * divested of its trade secrets, irrespective of what has been * deposited with the U.S. Copyright Office. *//* * import java.io.ObjectOutput; * import java.io.ObjectInput; */import java.net.URL;import java.io.OutputStream;import java.io.IOException;import java.awt.image.ImageProducer;public class AgletImageData implements com.ibm.aglet.util.ImageData, 									   java.io.Serializable {	static final long serialVersionUID = 5393039055419095915L;	URL url;	byte buf[];	String type;	public AgletImageData(URL u, byte[] b, String t) {		url = u;		buf = b;		type = t;	}	public ImageProducer getImageProducer() {		return new ByteArrayImageSource(buf, type);	}	public int hashCode() {		return url.hashCode();	}	/*	 * To support manual serialization	 * public AgletImageData() {	 * }	 * 	 * public void writeExternal(ObjectOutput out) throws IOException {	 * out.writeObject(externalURLForm);	 * out.writeObject(buf);	 * out.writeObject(type);	 * }	 * 	 * public void readExternal(ObjectInput in) throws IOException {	 * try {	 * externalURLForm = (String)in.readObject();	 * buf = (byte[])in.readObject();	 * type = (String)in.readObject();	 * } catch (ClassNotFoundException ex) {	 * throw new IOException(ex.getMessage());	 * }	 * }	 * 	 */	public void writeTo(OutputStream out) throws IOException {		out.write(buf);	}}

⌨️ 快捷键说明

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