选择显示字体大小

cldc的类库api

如果不严格的说,cldc的类库是j2se的一个小的子集,有以下这种近似关系成立,即j2se包含cdc包含cldc。但要注意cldc并未完全包含于j2se,它还包括一些专门针对无线设施的类。所以可以把cldc的类库简要划分为两部分:从j2se继承的类和cldc专有的类。

1. 从j2se继承的类

这部分包括三个package,即java.lang,java.util和java.io。注意即使这些从j2se继承的的类,也是大大“缩了水”的。例如java.util的类与接口由j2se的47个缩减到10个。另外两个也有相应缩减。

系统类

from java.lang:
object, class, runtime, system, thread, runnable,
string, stringbuffer, throwable


数据类型类

from java.lang:
boolean, byte, short, integer, long, character


容器类(container class)

from java.util:
vector, stack, hashtable, enumeration


i/o 类

from java.i
inputstream, outputstream, bytearrayinputstream,
bytearrayoutputstream, datainput, dataoutput,
datainputstream, dataoutputstream, reader, writer,
inputstreamreader, outputstreamwriter, printstream


日期与时间类

from java.util:
calendar, date, timezone

附加的实用类

java.util.random, java.lang.math


异常类(exception classes)

from java.lang:
exception, classnotfoundexception,
illegalaccessexception, instantiationexception,
interruptedexception, runtimeexception,
arithmeticexception, arraystoreexception,
classcastexception, illegalargumentexception,
illegalthreadstateexception, numberformatexception,
illegalmonitorstateexception, indexoutofboundsexception,
arrayindexoutofboundsexception,
stringindexoutofboundsexception,
negativearraysizeexception, nullpointerexception,
securityexception

from java.util:
emptystackexception, nosuchelementexception

from java.i
eofexception, ioexception, interruptedexception,
unsupportedencodingexception, utfdataformatexception


错误类

from java.lang:
error, virtualmachineerror, outofmemoryerror

2. cldc专有的类

这里sun提供了javax.microedition.io包。用它来提供与外界沟通的桥梁。(注:就像在j2se中我们利用java.net.*)注意,所有的连接都由javax.microedition.connector创建。例如:
你可以打开一个http连接通过connector.open("http://www.chinajavaworld.com")

javax.microedition.io的接口包括:
connection, inputconnection, outputconnection,
streamconnection, contentconnection, datagramconnection,
streamconnectionnotifier

这里再说明一点,实际上你也可以看出,cldc所包括的类库,并不足以开发应用程序。例如,没有ui界面的支持等。这也正是cldc的设计理念。cldc本身就从未想过要解决所有的问题。这些问题要靠其上层的profile-midp来解决。例如javax.microedition.lcdui就是定义在midp中的ui包。


 


关键字 本文所属关键字

相关 与本文相关文章

分类 所有文章关键字导航

源码编程相关

Java   Asp   PHP   .Net   XML   C/C++   CGI   VB   Jsp   J2ee   J2se   J2me   EJB   Servlet   Tomcat   Resin   Struts   Weblogic   Eclipse   ANT   GUI   JMS   Web servise   IDEA   Webphere   Hibernate   Spring   Jboss   Applet   Swing   Socket   Javamail   Perl   Ajax   P2P   安全   模式   框架   测试   开源   游戏

SQL数据库相关

My-SQL   Ms-SQL   Access   DB2   Oracle   Sybase   SQLserver   索引   存储过程   加密   数据库   分页   视图  

手机无线相关

3G   Wap   CDMA   GRPS   GSM   IVR   彩信   短信   无线   增值业务

网页设计制作相关

HTML   CSS   网页配色   网页特效   Javascript   VBscript   Dreamweaver   Frontpage   JS   Web   网站设计

网站建设推广相关

建站经验   网站优化   网站排名   推广   Alexa

操作系统/服务器相关

Windows XP   Windows 2000   Windows 2003   Windows Me   Windows 9.x   Linux   UNIX   注册表   操作系统   服务器   应用服务器

图形图像多媒体相关

Photoshop   Fireworks   Flash   Coreldraw   Illustrator   Freehand   Photoimpact   多媒体   图形图像

标准 网站致力的规范

Valid CSS!

无不良内容,无不良广告,无恶意代码

Valid XHTML 1.0 Transitional

creativecommons