JavaSE
Nomenclature, standards and specifications 术语、标准和规范
General purpose packages
- contains java-library
- Object – the class that is the root of every class hierarchy.
- Enum – the base class for enumeration classes (as of J2SE 5.0).
- Class – the class that is the root of the Java reflection system.
- Throwable – the class that is the base class of the exception class hierarchy.
- Error, Exception, and RuntimeException – the base classes for each exception type.
- Thread – the class that allows operations on threads.
- String – the class for strings and string literals.
- StringBuffer and StringBuilder – classes for performing string manipulation (
StringBuilder
as of J2SE 5.0).
- Comparable – the interface that allows generic comparison and ordering of objects (as of J2SE 1.2).
- Iterable – the interface that allows generic iteration using the enhanced
for
loop (as of J2SE 5.0).
- ClassLoader, Process, Runtime, SecurityManager, and System – classes that provide “system operations” that manage the dynamic loading of classes, creation of external processes, host environment inquiries such as the time of day, and enforcement of security policies.
- Math and StrictMath – classes that provide basic math functions such as sine, cosine, and square root (
StrictMath
as of J2SE 1.3).
- The primitive wrapper classes that encapsulate primitive types as objects.
- The basic exception classes thrown for language-level and other common exceptions.
java.lang
java.lang.ref
- 提供了比其他方式更灵活的 引用 类型,允许应用程序和 Java 虚拟机(JVM)垃圾收集器 之间进行有限的交互。
java.lang.ref
包定义了其他三种类型的引用——软引用、弱引用 和幻像引用 (soft, weak, and phantom references)。每种类型的参考都是针对特定用途而设计的。
java.lang.reflect
java-reflection
- basic techniques involved in reflection:
- Discovery
- Use by name
java.io
- 中心类: 读取和写入字节流的抽象基类
- 相关类
- 杂项类来支持与主机文件系统的交互。
Streams
- 流类遵循 装饰器模式,通过扩展基子类向流类添加功能。
- Random access
- File system
java.nio
java.math
java.net
:网络提供了特殊的 IO 例程 (routines),允许 HTTP 请求以及其他常见事务。
java.text
:字符串的解析例程,并支持各种人类可读的语言和特定于语言环境的解析。
java.util
:Collections API ,这是一种受 设计模式 考虑因素影响很大的有组织的数据结构层次结构。
Source/Destination | Name | Stream types | In/out | Classes |
---|
byte array (byte[] ) | ByteArray | byte | in, out | ByteArrayInputStream , ByteArrayOutputStream |
char array (char[] ) | CharArray | char | in, out | CharArrayReader , CharArrayWriter |
file | File | byte , char | in, out | FileInputStream , FileOutputStream , FileReader , FileWriter |
string (StringBuffer ) | String | char | in, out | StringReader , StringWriter |
thread (Thread ) | Piped | byte , char | in, out | PipedInputStream , PipedOutputStream , PipedReader , PipedWriter |
Operation | Name | Stream types | In/out | Classes |
---|
buffering | Buffered | byte , char | in, out | BufferedInputStream , BufferedOutputStream , BufferedReader , BufferedWriter |
”push back” last value read | Pushback | byte , char | in | PushbackInputStream , PushbackReader |
read/write primitive types | Data | byte | in, out | DataInputStream , DataOutputStream |
object serialization (read/write objects) | Object | byte | in, out | ObjectInputStream , ObjectOutputStream |
Special purpose packages
java.applet
java.beans
java-beans
java.awt
java.awt
(或抽象窗口工具包)提供对一组基本 GUI 小部件的访问,这些小部件基于底层本机平台的小部件集、GUI 事件子系统的核心以及本机窗口系统和 Java 应用程序之间的接口。它还提供了几个基本的 布局管理器、与 剪贴板 和 拖放 一起使用的数据传输包、输入设备(例如 鼠标 和 键盘) 的接口以及对支持系统上的 系统托盘 的访问。该包与 javax.swing
一起包含 JDK 6 中最多数量的枚举(总共 7 个)。
java.rmi
java.security
java.sql
jdbc
javax.rmi
javax.swing
javax.swing.text.html.parser
- 提供了容错 HTML 解析器,用于编写各种 Web 浏览器和 Web 机器人。
javax.xml.bind.annotation
- 定义了用于自定义 Java 程序元素到 XML 模式映射的注释。
- OMG packages → remove on java11
org.omg.CORBA
org.omg.PortableInterceptor