##Apache Commonsjava
Apache Commons是Apache的一個開源項目,主要致力於各類可重用的Java組件。主要由如下三部分構成:web
The Commons Proper
- 一個可重用的Java組件庫(已經開發完的項目,通常咱們導入相關jar
包就能夠使用)The Commons Sandbox
- Java組件開發工做區(正在開發的項目)The Commons Dormant
- 當前處於非活躍的Java組件庫(其實就是還沒開始開發)###The Commons Proper 通常咱們比較關注就是The Commons Proper
,這裏面都是現成的組件庫,基本上拿來就能夠使用,應該導入其提供的相關jar
包,就能夠用了。因此咱們着重介紹 The Commons Proper
項目apache
The Commons Proper 是一個爲開發者提供合做和資源共享的地方。下面列出已經release的Java組件項目,其中像Email(發送郵件),FileUpload(文件上傳),Compress(Java壓縮文件),BCEL(分析,操縱Java類文件)等項目就我本身比較熟悉的,用得應該很廣!剩下好多項目都還很值得研究一下!app
<table> <tr> <td>Components</td> <td>Description</td> <td>Latest Version</td> <td>Released</td> </tr> <tr> <td>BCEL</td> <td>Byte Code Engineering Library - analyze, create, and manipulate Java class files</td> <td>5.2</td> <td>2007-06-14</td> </tr> <tr> <td>BeanUtils</td> <td>Easy-to-use wrappers around the Java reflection and introspection APIs.</td> <td>1.9.2</td> <td>2014-05-29</td> </tr> <tr> <td>BSF</td> <td>Bean Scripting Framework - interface to scripting languages, including JSR-223</td> <td>3.1</td> <td>2010-24-06</td> </tr> <tr> <td>Chain</td> <td>Chain of Responsibility pattern implemention.</td> <td>1.2</td> <td>2008-06-02</td> </tr> <tr> <td>CLI</td> <td>Command Line arguments parser.</td> <td>1.2</td> <td>2009-03-19</td> </tr> <tr> <td>Codec</td> <td>General encoding/decoding algorithms (for example phonetic, base64, URL).</td> <td>1.9</td> <td>2013-12-25</td> </tr> <tr> <td>Collections</td> <td>Extends or augments the Java Collections Framework.</td> <td>4.0</td> <td>2013-11-24</td> </tr> <tr> <td>Compress</td> <td>Defines an API for working with tar, zip and bzip2 files.</td> <td>1.8.1</td> <td>2014-05-14</td> </tr> <tr> <td>Configuration</td> <td>Reading of configuration/preferences files in various formats.</td> <td>1.10</td> <td>2013-10-27</td> </tr> <tr> <td>CSV</td> <td>Component for reading and writing comma separated value files.</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td>Daemon</td> <td>Alternative invocation mechanism for unix-daemon-like java code.</td> <td>1.0.15</td> <td>2013-03-04</td> </tr> <tr> <td>DBCP</td> <td>Database connection pooling services.</td> <td>2.0.1</td> <td>2014-05-24</td> </tr> <tr> <td>DbUtils</td> <td>JDBC helper library.</td> <td>1.6</td> <td>2014-07-20</td> </tr> <tr> <td>Digester</td> <td>XML-to-Java-object mapping utility.</td> <td>3.2</td> <td>2011-12-13</td> </tr> <tr> <td>Discovery</td> <td>Tools for locating resources by mapping service/reference names to resource names.</td> <td>0.5</td> <td>2011-04-28</td> </tr> <tr> <td>EL</td> <td>Interpreter for the Expression Language defined by the JSP 2.0 specification.</td> <td>1.0</td> <td>2003-06-18</td> </tr> <tr> <td>Email</td> <td>Library for sending e-mail from Java.</td> <td>1.3.3</td> <td>2014-07-11</td> </tr> <tr> <td>Exec</td> <td>API for dealing with external process execution and environment management in Java.</td> <td>1.2</td> <td>2014-01-02</td> </tr> <tr> <td>FileUpload</td> <td>File upload capability for your servlets and web applications.</td> <td>1.3.1</td> <td>2014-02-07</td> </tr> <tr> <td>Functor</td> <td>A functor is a function that can be manipulated as an object, or an object representing a single, generic function.</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td>Imaging (previously called Sanselan)</td> <td>A pure-Java image library.</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td>IO</td> <td>Collection of I/O utilities.</td> <td>2.4</td> <td>2012-06-12</td> </tr> <tr> <td>JCI</td> <td>Java Compiler Interface</td> <td>1.1</td> <td>2013-10-14</td> </tr> <tr> <td>JCS</td> <td>Java Caching System</td> <td>1.3</td> <td>2007-06-05</td> </tr> <tr> <td>Jelly</td> <td>XML based scripting and processing engine.</td> <td>1.0</td> <td>2005-06-16</td> </tr> <tr> <td>Jexl</td> <td>Expression language which extends the Expression Language of the JSTL.</td> <td>2.1.1</td> <td>2011-12-24</td> </tr> <tr> <td>JXPath</td> <td>Utilities for manipulating Java Beans using the XPath syntax.</td> <td>1.3</td> <td>2008-08-14</td> </tr> <tr> <td>Lang</td> <td>Provides extra functionality for classes in java.lang.</td> <td>3.3.2</td> <td>2014-04-09</td> </tr> <tr> <td>Launcher</td> <td>Cross platform Java application launcher.</td> <td>1.1</td> <td>2004-08-22</td> </tr> <tr> <td>Logging</td> <td>Wrapper around a variety of logging API implementations.</td> <td>1.2</td> <td>2014-07-11</td> </tr> <tr> <td>Math</td> <td>Lightweight, self-contained mathematics and statistics components.</td> <td>3.3</td> <td>2014-05-14</td> </tr> <tr> <td>Modeler</td> <td>Mechanisms to create Model MBeans compatible with JMX specification.</td> <td>2.0.1</td> <td>2007-06-25</td> </tr> <tr> <td>Net</td> <td>Collection of network utilities and protocol implementations.</td> <td>3.3</td> <td>2013-06-12</td> </tr> <tr> <td>OGNL</td> <td>An Object-Graph Navigation Language</td> <td>N/A</td> <td>N/A</td> </tr> <tr> <td>Pool</td> <td>Generic object pooling component.</td> <td>2.2</td> <td>2014-02-24</td> </tr> <tr> <td>Primitives</td> <td>Smaller, faster and easier to work with types supporting Java primitive types.</td> <td>1.0</td> <td>2003-11-05</td> </tr> <tr> <td>Proxy</td> <td>Library for creating dynamic proxies.</td> <td>1.0</td> <td>2008-02-28</td> </tr> <tr> <td>SCXML</td> <td>An implementation of the State Chart XML specification aimed at creating and maintaining a Java SCXML engine. It is capable of executing a state machine defined using a SCXML document, and abstracts out the environment interfaces.</td> <td>0.9</td> <td>2008-12-01</td> </tr> <tr> <td>Validator</td> <td>Framework to define validators and validation rules in an xml file.</td> <td>1.4.0</td> <td>2012-02-03</td> </tr> <tr> <td>VFS</td> <td>Virtual File System component for treating files, FTP, SMB, ZIP and such like as a single logical file system.</td> <td>2.0</td> <td>2011-08-24</td> </tr> <tr> <td>Weaver</td> <td>Provides an easy way to enhance (weave) compiled bytecode.</td> <td>1.0</td> <td>2014-03-16</td> </tr> </table>ide
這些項目都已是release版本,能夠直接用。剩下的The Commons Sandbox
和The Commons Dormant
就不介紹了。以後的文章,我會分析一下第一個項目Java BCEL,這是一個Java字節碼設計庫,能夠用來修改,建立,操做Java類文件。設計
##參考連接 Apache Commons Java BCELunix