- 浏览: 409149 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (325)
- 神经网络 (1)
- javascript (11)
- 数据结构 (2)
- 计算机图形学 (11)
- 模式识别 (1)
- 前端开发 (14)
- 机器学习 (11)
- ios开发 (50)
- Python (9)
- HTML5 (4)
- 计算机视觉 (9)
- 数字图像处理 (7)
- 架构设计 (19)
- 数据库设计 (9)
- 算法设计 (59)
- Java (37)
- 其他 (3)
- 游戏开发 (5)
- c++ (17)
- Linux (3)
- TCP/IP (2)
- Flex (41)
- 健康 (6)
- AI (2)
- 工具 (1)
- 数据挖掘 (1)
- 性能优化 (6)
- 综合 (2)
- 网络通信 (12)
- Android (2)
- UML (3)
- 软件设计 (11)
- 编程经验 (7)
- J2EE (1)
- 多媒体技术 (3)
- 数学 (7)
- php (4)
- 设计 (1)
- CS (2)
- 计算机理论 (1)
- 信息安全 (1)
最新评论
-
ahead_zhan:
good good good
flex3控件_ModuleLoader -
lonerzf:
好样的。非常感谢楼主
OpenCV视频教程整理 -
lonerzf:
好样的。谢谢~
OpenCV视频教程整理 -
coding1688:
博主说的不错,我在实现瀑布流布局时也用的masonry插件,有 ...
Javascript 瀑布流式布局及其动态效果的实现 -
snowolf:
除非玩游戏,不然没啥win的事情,或者用win的银行客户端,通 ...
macbook安装操作系统的机理分析
On the client side, the identity of a class that implements the flash.utils.IExternalizable interface is written in the serialization stream. The class serializes and reconstructs the state of its instances. The class implements thewriteExternal() and readExternal() methods of the IExternalizable interface to get control over the contents and format of the serialization stream, but not the class name or type, for an object and its supertypes. These methods supersede the native AMF serialization behavior. These methods must be symmetrical with their remote counterpart to save the class's state.
On the server side, a Java class that implements the java.io.Externalizable interface performs functionality that is analogous to an ActionScript class that implements the flash.utils.IExternalizable interface.
it is say that the client side and server side must be serialization.You implement the ActionScript-basedflash.utils.IExternalizable interface on the client and the corresponding Java-based java.io.Externalizable interface on the server.
The following example shows the complete source code for the client (ActionScript) version of a Product class that maps to a Java-based Product class on the server.
package samples.externalizable {
import flash.utils.IExternalizable;
import flash.utils.IDataInput;
import flash.utils.IDataOutput;
[RemoteClass(alias="samples.externalizable.Product")]
public class Product implements IExternalizable {
public function Product(name:String=null) {
this.name = name;
}
public var id:int;
public var name:String;
public var properties:Object;
public var price:Number;
public function readExternal(input:IDataInput):void {
name = input.readObject() as String;
properties = input.readObject();
price = input.readFloat();
}
public function writeExternal(output:IDataOutput):void {
output.writeObject(name);
output.writeObject(properties);
output.writeFloat(price);
}
}
}
The following example shows the complete source of the server Product class:
// Product.java
package samples.externalizable;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Map;
/**
* This Externalizable class requires that clients sending and
* receiving instances of this type adhere to the data format
* required for serialization.
*/
public class Product implements Externalizable {
private String inventoryId;
public String name;
public Map properties;
public float price;
public Product()
{
}
/**
* Local identity used to track third-party inventory. This property is
* not sent to the client because it is server specific.
* The identity must start with an 'X'.
*/
public String getInventoryId() {
return inventoryId;
}
public void setInventoryId(String inventoryId) {
if (inventoryId != null && inventoryId.startsWith("X"))
{
this.inventoryId = inventoryId;
}
else
{
throw new IllegalArgumentException("3rd party product
inventory identities must start with 'X'");
}
}
/**
* Deserializes the client state of an instance of ThirdPartyProxy
* by reading in String for the name, a Map of properties
* for the description, and
* a floating point integer (single precision) for the price.
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
// Read in the server properties from the client representation.
name = (String)in.readObject();
properties = (Map)in.readObject();
price = in.readFloat();
setInventoryId(lookupInventoryId(name, price));
}
/**
* Serializes the server state of an instance of ThirdPartyProxy
* by sending a String for the name, a Map of properties
* String for the description, and a floating point
* integer (single precision) for the price. Notice that the inventory
* identifier is not sent to external clients.
*/
public void writeExternal(ObjectOutput out) throws IOException {
// Write out the client properties from the server representation.
out.writeObject(name);
out.writeObject(properties);
out.writeFloat(price);
}
private static String lookupInventoryId(String name, float price) {
String inventoryId = "X" + name + Math.rint(price);
return inventoryId;
}
}
发表评论
-
多种加密算法实现(JAVA)
2013-10-24 09:18 1621有短句“Sun Yat-sen University is ... -
nginx上搭建HLS流媒体服务器
2013-07-28 13:31 1391转自:http://blog.csdn.net/ ... -
断点续传的原理
2013-05-07 19:53 831转自:http://www.ibm.com/develope ... -
ActionScript最新3D引擎项目(转载)
2012-10-23 19:11 8603D引擎 注:对于3D引擎,渲染的效率和支持的渲染功 ... -
Flash 3D的相关文章推荐
2012-10-12 15:18 0Flash ActionScript 3.0的3D效果处 ... -
深入浅出了解Molehill的底层API-顶点着色器与片段着色器
2012-10-12 11:07 1280转自:http://www.adob ... -
ActionScript 3 和 Flex框架的性能优化
2012-08-29 09:33 766与其在程序写完了之后臃肿得跑不动,不如平时注意这些关键点,时时 ... -
《JAVA与模式》之调停者模式
2012-06-21 20:06 639参考:http://www.cnblo ... -
BlazeDS的架构和工作原理简介
2012-06-02 14:09 890参考:http://hi.baidu.com/whlxj ... -
Java 线程池的原理与实现
2011-10-23 15:48 697参考: http://www.blogjava.ne ... -
Flex性能优化常用手法总结
2011-06-04 10:29 860参考:http://www.webgamei.com/c ... -
浅谈AMF协议的优与劣
2011-06-03 16:33 1156参考:http://www.router.net.cn/Art ... -
FLASH/ActionScript 性能优化
2011-05-31 21:41 1199一. 图形方面的优化 1. 减少同时在屏幕上物体的个 ... -
FLEX4 中SKINCLASS使用PATH绘制多边形
2011-05-28 18:08 823skinClass中绘制多边形使用Path标签,把绘制 ... -
ActionScript 3 和 Flex框架的性能优化
2011-05-27 16:28 7241 创建新数组时避免使用它的构造函数。 这样做:var a ... -
Flex垃圾回收的一些知识总结
2011-05-27 16:27 850Flex垃圾回收的一些知识 ... -
ActionScript 3.0 性能优化小知识
2011-05-27 16:26 6771、改进算法无论对 ... -
34个有用的ActionScript 3.0的API
2011-05-21 14:20 931ArcGIS API for FlexArcGIS API ... -
Java中读取字节流并按指定编码转换成字符串的方法
2011-05-21 11:22 1452参考: http://www.blogjava.net/pen ... -
字节流编码获取原来这么复杂,但也很简单
2011-05-21 11:02 1503参考:http://www.cnblogs ...
相关推荐
Running from the command line: C# to Java Converter can be launched directly for a specific project, folder, or file conversion from the command line. Command line.(命令行执行) 其他一些特点: 1. ...
### MT-008 将振荡器相位噪声转换为时间抖动 #### 引言 在现代信号处理和通信系统中,高精度的时间稳定度对于实现高性能模数转换器(ADC)至关重要。ADC的孔径抖动规格是决定其信噪比(SNR)水平的关键因素之一。...
converting-from-speech-to-text-with-javascript 本教程中,我们将尝试使用Web Speech API,这是一个非常强大的浏览器接口,可以用来记录语音并将其转换为文本,同样的,也可以用来朗读字符串。 接下来进入正题,这...
While learning Python myself, I realized how fast and easy it was to understand and pick up Python’s syntax when I started converting Java’s programming problems into Python. I had already known ...
7. **可视化辅助**:`Converting Array to Map in Java.png`可能是一个流程图或示意图,帮助理解转换过程的可视化表示。在实际编程中,这类图表有助于解释代码逻辑,特别是在团队协作或技术文档中。 8. **异常处理*...
Comparators and Collectors for sorting and converting streaming data Combining lambdas, method references, and streams Creating instances and extract values from Java’s Optional type New I/O ...
Modern Java Recipes: Simple Solutions to Difficult Problems in Java 8 and 9 by Ken Kousen English | 11 Aug. 2017 | ISBN: 149197317X | ASIN: B074R6B13N | 322 Pages | AZW3 | 1.35 MB The introduction of...
The basics of lambda expressions and method references Interfaces in the java.util.function package Stream operations for transforming and filtering data Comparators and Collectors for sorting and ...
A Methodology For Converting Polygon Based Standard Cell From Bulk CMOS To SOI CMOS
"Converting the CONNECT sample to a local server"的主题聚焦于将一个基于CONNECT的示例应用移植到用户的本地服务器环境。这个过程通常包括几个关键步骤,涉及代码调整、配置更改以及对本地环境的适应。 首先,...
Adding a layer of interactivity to your plots and converting these plots into applications hold immense value in the field of data science. The standard approach to adding interactivity would be to ...
"Converting Oscillator Phase Noise to Time Jitter"是ADI公司工程师Walt Kester关于如何将振荡器相位噪声转换为时间抖动的一个深入讲解。这篇资料详细阐述了振荡器的相位噪声与系统时钟抖动之间的关系,以及如何...
This book is a ...can be seen as complementary to my own: while this one focusses on presentation of graphics, you will benefit from his book if you are interested in exploring data graphically.
Java Language Conversion Assistant provides developers using Visual Studio .NET 2003 a quick, low-cost method of converting Java-language applications to Visual C# and the .NET Framework. These ...
Hexanedioic acid mediated surface-ligand-exchange process for transferring NaYF"4:Yb/Er (or Yb/Tm) up-converting nanoparticles from hydrophobic to hydrophilic
Chapter 1. Variables: Declaration, Definition and Type ...delivery tools, or data directly accessible via different APIs, for converting many data from the Internet into data ready for your applications.
Java和Kotlin是两种流行的编程语言,广泛应用于Android应用开发和其他软件系统。它们的源代码在编译后会转换成字节码(Bytecode),这是一种平台无关的中间表示,可以在Java虚拟机(JVM)或Android虚拟机(ART)上...
今天把最近一直在开发的小程序放安卓手机上测试一下,结果某个页面就一直报错: Uncaught TypeError: Converting circular structure to JSON 先说一下基本的环境: 系统:Android 6.0.1 手机:小米4 微信版本:...
这个“Converting integer up to 16 to bit pattern”主题涉及了将16位整数转换为位模式的概念,这是在编程AB PLC时常见的操作。 在AB PLC编程中,我们经常需要处理二进制数据,因为PLC内部是以二进制形式存储和...