长篇预警 ,要有耐心才能看下去

1.1. 开篇

在Java的世界,有很多(成千上万)开源的框架,有成功的,也有不那么成功的,有声名显赫的,也有默默无闻的。在我看来,成功而默默无闻的那些框架值得我们格外的尊敬和关注,Jakarta Commons就是这样的一个框架。如果你至少参与了一个中型规模的Java项目,那么我想有超过一大半的机会你都接触和使用到了Jakarta Commons,不管你自己有没有察觉。就我所知,除了Apache Jakarta其他许多开源框架之外,不少所谓的商业框架其实内部有些模块是借用Commons的,甚至有一些完全就是对Commons的类进行了简单的封装。如果真的没有接触过也不要紧,当你看到它时,你自然会被它的简单而强大所吸引。

要提高Java编程水平,一条可以走的路就是学习优秀的开源框架。这又要分两个层面:应用层面和源码层面。

从应用来说,开源的框架大都可以给你带来生产力和/或代码质量的大幅提升;

从源码来说,Java开源框架,尤其是那些大型的优秀的框架,其源码对广大Java爱好者来说都是一笔巨大的财富,你可以从中学到许多课本上学不到的东西:编码习惯、代码组织、注释、文档、如何用Java解决实际问题、特定问题的算法,等等。而这些对于我们的作为软件开发者的实际工作而言,相当有意义。

熟悉Jakarta Commons的朋友可能会觉得现在是不是有点过时,因为有很多功能在J2SE 5.0中已经包含了。其实这个问题看你怎么去看,一方面,J2SE 5.0毕竟是刚出现不久的Java版本,实际应用中,很多时候我们需要把代码兼容等级维持在1.3或者1.4,所以很多5.0的功能我们暂时还不能放开手脚去使用;另一方面,鉴于Jakarta在一定程度上反映了一线Java开发人员的实际需求,而目前5.0已经采纳了其中许多特性,我们当然也有理由相信未来的Java版本还会继续参照Jakarta Commons的内容。有这么一套开发源码、免费使用、商业友好的优秀API作为Java自带API的补充,何乐而不为呢?

我打算在近期陆续做一些Jakarta Commons的学习笔记放上来,供大家参考。

有关Jakarta的最新动态和详细信息,可以参考:https://commons.apache.org/

1.2.简介

Apache Commons是一个非常有用的工具包,解决各种实际的通用问题

现在最新的jar 包是 

Welcome to Apache Commons

Apache Commons is an Apache project focused on all aspects of reusable Java components.

Apache Commons是一个Apache项目,专注于可重用Java组件的所有方面。

The Apache Commons project is composed of three parts:  Apache Commons项目由三部分组成:

  • The Commons Proper - A repository of reusable Java components.  可重用Java组件的存储库。
  • The Commons Sandbox - A workspace for Java component development.    用于Java组件开发的工作区。
  • The Commons Dormant - A repository of components that are currently inactive.    当前停止开发的组件库。

You may also read our charter, which spells out the goals of the project in greater detail.

您还可以阅读我们的章程,其中详细说明了项目的目标。

The Apache Commons source code repositories are writable for all ASF committers. While Apache Commons is a Commit-Then-Review community, we would consider it polite and helpful for contributors to announce their intentions and plans on the dev mailing list before committing code. All contributors should read our contributing guidelines. We accept patches as SVN diff files uploaded to the Apache bugtracker or as pull request via our github mirrors.

所有ASF提交者都可以编写Apache Commons源代码存储库。虽然Apache Commons是一个提交后检查的社区,但是我们认为,在提交代码之前,贡献者应该在dev邮件列表上宣布他们的意图和计划,这是礼貌的,也是有帮助的。所有贡献者都应该阅读我们的贡献指南。我们接受补丁作为SVN diff文件上传到Apache bugtracker或通过我们的github镜像拉请求。

Apache Commons Proper

Commons Proper is dedicated to one principal goal: creating and maintaining reusable Java components. The Commons Proper is a place for collaboration and sharing, where developers from throughout the Apache community can work together on projects to be shared by the Apache projects and Apache users.

Commons Proper致力于一个主要目标:创建和维护可重用的Java组件。Commons Proper是一个协作和共享的场所,整个Apache社区的开发人员可以共同协作Apache项目和Apache用户共享的项目。

Commons developers will make an effort to ensure that their components have minimal dependencies on other libraries, so that these components can be deployed easily. In addition, Commons components will keep their interfaces as stable as possible, so that Apache users (including other Apache projects) can implement these components without having to worry about changes in the future.

Commons开发人员将努力确保他们的组件对其他库具有最小的依赖性,以便可以轻松地部署这些组件。此外,Commons组件将使其接口尽可能保持稳定,以便Apache用户(包括其他Apache项目)可以实现这些组件,而无需担心将来的更改。

This article gives an overview of (some of) the components which can be found here.

该文章 给出了(一些),它可以在这里找到的组件的概述。

We welcome participation from all that are interested, at all skill levels. Coding, documentation and testing are all critical parts of the software development process. If you are interested in participating in any of these aspects, please join us!

我们欢迎所有感兴趣的,不同技术水平的人参加。编码、文档和测试都是软件开发过程的关键部分。如果你有兴趣参与其中任何一个方面,请加入我们!

Components Description Latest Version Released
BCEL Byte Code Engineering Library - analyze, create, and manipulate Java class files

字节代码工程库 - 分析,创建和操作Java类文件

6.2 2017-11-08
BeanUtils Easy-to-use wrappers around the Java reflection and introspection APIs.

Commons-BeanUtils 提供对 Java 反射和自省API的包装

1.9.3 2016-09-26
BSF Bean Scripting Framework - interface to scripting languages, including JSR-223

Bean Scripting Framework - 脚本语言的接口,包括JSR-223

3.1 2010-06-24
Chain Chain of Responsibility pattern implemention.
Chain 提供实现组织复杂的处理流程的“责任链模式”.    
1.2 2008-06-02
CLI Command Line arguments parser.
CLI 提供针对命令行参数,选项,选项组,强制选项等的简单API.
1.4 2017-03-09
Codec General encoding/decoding algorithms (for example phonetic, base64, URL).

Codec 包含一些通用的编码解码算法。包括一些语音编码器, Hex, Base64, 以及URL encoder.

1.11 2017-10-20
Collections Extends or augments the Java Collections Framework.

Commons-Collections 提供一个类包来扩展和增加标准的 Java Collection框架

4.1 2015-11-27
Compress Defines an API for working with tar, zip and bzip2 files.

定义用于处理tar,zip和bzip2文件的API。

1.17 2018-06-03
Configuration Reading of configuration/preferences files in various formats.

Commons-Configuration 工具对各种各式的配置和参考文件提供读取帮助.

2.2 2017-10-12
Crypto A cryptographic library optimized with AES-NI wrapping Openssl or JCE algorithm implementations.

使用AES-NI优化的加密库包装Openssl或JCE算法实现。

1.0.0 2016-07-22
CSV Component for reading and writing comma separated value files.

用于读写逗号分隔值文件的组件。

1.5 2017-09-03
Daemon Alternative invocation mechanism for unix-daemon-like java code.

一种 unix-daemon-like java 代码的替代机制

1.0.15 2013-04-03
DBCP Database connection pooling services.

Commons-DBCP 提供数据库连接池服务

2.3.0 2018-05-12
DbUtils JDBC helper library.

DbUtils 是一个 JDBC helper 类库,完成数据库任务的简单的资源清除代码.

1.7 2017-07-20
Digester XML-to-Java-object mapping utility.

Commons-Digester 是一个 XML-Java对象的映射工具,用于解析 XML配置文件.

3.2 2011-12-13
Email Library for sending e-mail from Java.

用于从Java发送电子邮件的库。

1.5 2017-08-01
Exec API for dealing with external process execution and environment management in Java.

用于在Java中处理外部流程执行和环境管理的API。

1.3 2014-11-06
FileUpload File upload capability for your servlets and web applications.

FileUpload 使得在你可以在应用和Servlet中容易的加入强大和高性能的文件上传能力

1.3.3 2017-06-13
Functor A functor is a function that can be manipulated as an object, or an object representing a single, generic function.

仿函数是可以作为对象操作的函数,或者是表示单个通用函数的对象。

1.0 2011-??-??
Geometry Space and coordinates.

空间和坐标。

1.0 2018-??-??
Imaging (previously called Sanselan) A pure-Java image library.

纯Java图像库。

0.97-incubator 2009-02-20
IO Collection of I/O utilities.
IO 是一个 I/O 工具集
2.6 2017-10-15
JCI Java Compiler Interface

Java编译器接口

1.1 2013-10-14
JCS Java Caching System

Java缓存系统

2.2 2017-08-02
Jelly XML based scripting and processing engine.

Jelly是一个基于 XML 的脚本和处理引擎。 Jelly 借鉴了 JSP 定指标签,Velocity, Cocoon和Xdoclet中的脚本引擎的许多优点。
Jelly 可以用在命令行, Ant 或者 Servlet之中。

1.0.1 2017-09-27
Jexl Expression language which extends the Expression Language of the JSTL.

Jexl是一个表达式语言,通过借鉴来自于Velocity的经验扩展了JSTL定义的表达式语言。.

3.1 2017-04-14
JXPath Utilities for manipulating Java Beans using the XPath syntax.

Commons-JXPath 提供了使用Xpath语法操纵符合Java类命名规范的 JavaBeans的工具。
也支持 maps, DOM 和其他对象模型。.

1.3 2008-08-14
Lang Provides extra functionality for classes in java.lang.

Commons-Lang 提供了许多许多通用的工具类集,提供了一些java.lang中类的扩展功能

3.6 2017-06-08
Logging Wrapper around a variety of logging API implementations.

Commons-Logging 是一个各种 logging API实现的包裹类.

1.2 2014-07-11
Math Lightweight, self-contained mathematics and statistics components.

Math 是一个轻量的,自包含的数学和统计组件,解决了许多非常通用但没有及时出现在Java标准语言中的实践问题.

3.5 2015-04-17
Net Collection of network utilities and protocol implementations.

Net 是一个网络工具集,基于 NetComponents 代码,包括 FTP 客户端等等。

3.6 2017-02-15
Numbers Number types (complex, quaternion, fraction) and utilities (arrays, combinatorics).

数字类型(复数,四元数,分数)和实用程序(数组,组合数学)。

1.0 2017-??-??
OGNL An Object-Graph Navigation Language

对象图导航语言

4.0 2013-??-??
Pool Generic object pooling component.

Commons-Pool 提供了通用对象池接口,一个用于创建模块化对象池的工具包,以及通常的对象池实现.

2.5.0 2017-12-19
Proxy Library for creating dynamic proxies.

用于创建动态代理的库。

1.0 2008-02-28
RDF Common implementation of RDF 1.1 that could be implemented by systems on the JVM.

可以由JVM上的系统实现的RDF 1.1的通用实现。

0.3.0-incubating 2016-11-15
RNG Implementations of random numbers generators.

随机数发生器的实现

1.0 2016-12-13
SCXML 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.

旨在创建和维护Java SCXML引擎的State Chart XML规范的实现。
它能够执行使用SCXML文档定义的状态机,并抽象出环境接口。

0.9 2008-12-01
Statistics Statistics.
统计。
0.1 ????-??-??
Text Apache Commons Text is a library focused on algorithms working on strings.

Apache Commons Text是一个专注于处理字符串的算法的库。

1.3 2018-03-21
Validator Framework to define validators and validation rules in an xml file.

The commons-validator提供了一个简单的,可扩展的框架来在一个XML文件中定义校验器 (校验方法)和校验规则。支持校验规则的和错误消息的国际化。

1.6 2017-02-21
VFS Virtual File System component for treating files, FTP, SMB, ZIP and such like as a single logical file system.

虚拟文件系统组件,用于将文件,FTP,SMB,ZIP等处理为单个逻辑文件系统。

2.2 2017-10-06
Weaver Provides an easy way to enhance (weave) compiled bytecode.

提供一种增强(编织)编译字节码的简便方法。

1.3 2016-10-18

The Commons Sandbox

The Commons project also contains a workspace that is open to all Apache committers. It's a place to try out new ideas and prepare for inclusion into the Commons portion of the project or into another Apache project. Users are free to experiment with the components developed in the sandbox, but sandbox components will not necessarily be maintained, particularly in their current state.

Commons项目还包含一个对所有Apache提交者开放的工作空间。这是一个尝试新想法并准备包含在项目的Commons部分或另一个Apache项目的地方。用户可以自由地尝试沙箱中开发的组件,但不一定要维护沙箱组件,特别是在当前状态下。

有关Sandbox组件,请参见此处。

See here for Sandbox components.

The Commons Dormant

These are Commons components that have been deemed inactive since they have seen little recent development activity. If you wish to use any of these components, you must build them yourselves. It is best to assume that these components will not be released in the near future.

这些Commons组件被认为是非活动的,因为他们最近几乎没有看到开发活动。如果您想使用这些组件中的任何一个,您必须自己构建它们。最好假设这些组件不会在不久的将来发布。

请参阅此处了解休眠组件。

See here for Dormant components.

Where do I get releases?

The individual components have independent releases. Some releases for some components may be available only through the mirroring system. Some releases for some components (typically the older ones) are not available through the mirroring system.

各个组件都有独立的版本。某些组件的某些版本只能通过镜像系统使用。某些组件(通常是较旧的组件)的某些版本无法通过镜像系统获得。

有关特定下载内容,请参阅上面列出的各个网站,或使用“ 版本” 菜单选项。

See the individual websites listed above for the specific downloads, or use the Releases menu option.

How do I contribute, give feedback, fix bugs and so on?

我如何贡献,提供反馈,修复错误等等?

The Commons project really needs and appreciates any contributions, including documentation help, source code and feedback.

Commons项目确实需要并赞赏任何贡献,包括文档帮助,源代码和反馈。

  • Discussion occurs on the Commons mailing list.      讨论发生在 Commons邮件列表中。
  • We have an IRC channel on freenode - join #apache-commons.          我们在freenode上有一个IRC频道 - 加入#apache-commons。
  • Access to the SVN commons/proper repository is available both online and with a svn client.        可以在线和使用 svn客户端 访问SVN 公共/适当的存储库 。
  • Access to the SVN commons/sandbox repository is available both online and with a svn client.
  • Access to the SVN commons/dormant repository is available both online and with a svn client.

Related Components @Apache

相关组件@Apache

The Commons HttpClient project used to be a part of Commons, but is now part of Apache HttpComponents - see Jakarta Commons HttpClient

Commons HttpClient项目曾经是Commons的一部分,但现在是Apache HttpComponents的一部分 - 请参阅 Jakarta Commons HttpClient

最后:Jakarta Commons这个类库中非常重要的三个子项目:Commons Lang、Commons BeanUtils和Commons Collections,这些工具包在无数开源或商业框架中都可以找到,可以说应用范围非常广。

当然,Jakarta Commons提供的API远不止我们提到的这些,除了上述三个核心项目之外,还有读取和映射XML文档的Digester/Betwixt、处理命令行参数的CLI、提供常用编码算法的Codec、用于读取多种格式的配置文件的Configuration、发送电子邮件的Email、上传文件的FileUpload、模拟HTTP客户端的HttpClient、处理日志的Logging等等等等,实在是相当的丰富。

参考: http://www.cnblogs.com/jimcsharp/p/8872144.html

https://commons.apache.org/

初识 Apache Commons jar 包相关推荐

  1. java Apache Commons jar包简介

    一.Commons BeanUtils 说明:针对Bean的一个工具集.由于Bean往往是有一堆get和set组成,所以BeanUtils也是在此基础上进行一些包装. 二.Commons CLI 说明 ...

  2. java org.apache.http_org.apache.http jar包下载-org.apache.http.jar包下载 --pc6下载站

    org.apache.http.jar包是一款十分常用的jar包如果没有org.apache.http.jar包Apache与http的链接将会出现错误等现象马上下载org.apache.http.j ...

  3. apache shiro jar包_只需要6个步骤,springboot集成shiro,并完成登录

    小Hub领读: 导入jar包,配置yml参数,编写ShiroConfig定义DefaultWebSecurityManager,重写Realm,编写controller,编写页面,一气呵成.搞定,是个 ...

  4. 使用maven引入Apache poi jar包

    maven构建的项目-->pom.xml文件 eclipse提供Dependencies直接添加依赖jar包的工具:直接搜索poi以及poi-ooxml即可,maven会自动依赖需要的jar包: ...

  5. IO与文件读写---使用Apache commons io包提高读写效率

    [一]Apache commons IO简介 首先贴一段Apache commons IO官网上的介绍,来对这个著名的开源包有一个基本的了解: Commons IO is a library of u ...

  6. Apache Commons Collections包和简介

    背景介绍 Apache Commons是Apache软件基金会的项目,曾经隶属于Jakarta项目.Commons的目的是提供可重用的.解决各种实际的通用问题且开源的Java代码.Commons由三部 ...

  7. org.springframework.uti包下的StringUtils的使用和org.apache.commons.lang包下StringUtils的使用

    一.org.springframework.util.StringUtils StringUtils常用方法 描述 boolean isEmpty(Object str) 判断字符串是否为空,如果为n ...

  8. java poi jar maven_使用maven引入Apache poi jar包

    mysql 用户管理和权限设置 用户管理 mysql>use mysql; 查看 mysql> select host,user,password from user ; 创建 mysql ...

  9. Apache commons lang3包ArrayUtils工具使用

    ArrayUtils 拥有以下方法: toString 将一个数组转换成String,用于打印数组 isEquals 判断两个数组是否相等,采用EqualsBuilder进行判断 toMap 将一个数 ...

最新文章

  1. android 嵌套h5实现2048游戏
  2. LIGA Stereo:基于双目3D检测的Lidar几何感知表示学习(ICCV2021)
  3. Flutter开发之Input-TextField-文本输入框(45)
  4. mysql(五)查询缓存
  5. python真的有用吗-你真的认为python有那么好吗
  6. Elasticsearch查询相关总结以及timestamp和时区问题
  7. B. 熟练剖分(tree) (概率DP)
  8. [PAT乙级]1042 字符统计
  9. Python风格总结:翻转列表、数组
  10. Revit二次开发之“让对象处于被选择状态”
  11. Sizeof的计算看内存分配
  12. HCIE Security 防火墙转发流程及相关知识点 备考笔记(幕布)
  13. Pycharm中如何pip下载包更快
  14. 利用场景法设计atm自动取款机的测试用例_如何使用场景法设计测试用例
  15. LLVM LLD PE 格式分析 (COFF)
  16. linux内核tc,Linux 内核流量控制 TC 详解
  17. 零跑坚持自主研发,探索数字时代的驾驶体验
  18. C语言完成图书管理系统
  19. MATLAB——IIR数字滤波器的设计
  20. Python 爬虫json格式化输出

热门文章

  1. D3.js - path使用
  2. workbench tabular data怎么增加一行_pandas 索引名重名 怎么办
  3. Excel如何对同一单元格中的多数字进行求和
  4. 6. 个人信用报告数据项
  5. 高功率光纤激光切割机,可以做更多的事
  6. css 文字换行和超出部分省略号
  7. 顶点计划Ⅰ最终调查报告
  8. 解决animate.css在谷歌浏览器下无效
  9. MyCat权威指南阅读笔记(基础篇)
  10. Mac连接远程服务器命令