First of all we need to understand what CODEC means. It is Coder + Decoder = Codec, which is the encoder decoder. That is, the encoder is also the decoder.Website address: http://commons.apache.org/proper/commons-codec/Apache Commons
Java uses Apache commons codec for MD5 encryption, BASE64 encryption and decryption, and executes system commands, commonsbase64
Before writing the code, let's first introduce the two packages we will use;
Commons-codec-1.10.jarTool packages used to process common encoding m
Apache Commons Codec's language is a powerful package, mainly used in the processing of various languages, of course, this package of Chinese characters support is very bad. This piece of content, on the Internet very little, can only write some very superficial code, if there is a chance to contact, and then perfect.Let's start by learning the code examples.
Examples of Soundex Coding
An exception occurred while encoding:
Java.lang.NoSuchMethodError:No static Method Encodebase64string ([B) ljava/lang/string; in class lorg/apache/commons/ Codec/binary/base64; or its Super classes (Declaration of ' org.apache.commons.codec.binary.Base64 ' appears in/system/framework/ Org.apache.http.legacy.boot.jar)
Decoding problem:
Java.
commons-codecis a package provided by the Apache Open source organization for digest operations and encoding. In this package is divided into four types of encryption: Binaryencoders, Digestencoders, Languageencoders, Networkencoders.Today I would like to introduce you how to use commons-codec the package to complete t
1. [Code]MD5String str = "abc"// with . NET generated MD5 method, the generated content is consistent with Java:String str = "ABC" "MD5");2. [Code]SHA1String str = "abc"// with . NET generates SHA1 in the same way that the generated content is consistent with Java:String str= "abc" "SHA1");3. [Code]BASE64// Encrypt // ABC is the string to encrypt byte true ); System.out.println (new// decryption // YWJJ for the string to decrypt BYTE[] b = base64.decodebase64 (str.getbytes ()); System.out.print
Apache Commons Configuration introduction and simple codeApache Commons Configuration The latest version is 2.0alpha, for security purposes, we use the 1.1 official version, the main function is to read the resource files, each file format has a corresponding class, as follows:· Properties Files· XML Documents· Windows INI files· Property List Files (plist)·
Apache commons contains many open-source tools to solve common programming problems and reduce repetitive work. I have selected some common projects for a brief introduction. I used a lot of online ready-made items in this article. I just made a summary.
Commons beanutilsHttp://jakarta.apache.org/commons/beanutils/ind
Address: http://blog.csdn.net/ocelight/archive/2009/09/02/4510192.aspx
Http://commons.apache.org/
Apache commons contains many open-source tools to solve common programming problems and reduce repetitive work. I have selected some common projects for a brief introduction. I used a lot of online ready-made items in this article. I just made a summary.
Commons bean
Copyright Disclaimer: During reprinting, please use hyperlinks to indicate the original source and author information of the article and this statementHttp://wolfchina.blogbus.com/logs/16081662.html
Apache commons contains many open-source tools to solve common programming problems and reduce repetitive work. I have selected some common projects for a brief introduction. I used a lot of online ready-made it
Apache commons contains many open-source tools to solve common programming problems and reduce repetitive work. I have selected some common projects for a brief introduction. I used a lot of online ready-made items in this article. I just made a summary.
1. commons beanutils
Http://jakarta.apache.org/commons/beanutils
accesses the scripting language through Java.21, Commons ChainDescription: You can use commons Chain when you need to define and perform some sequential operations.22, Commons CompressDescription: Is a class library for compressing and extracting files. Can operate AR, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 formatted files, powerful23,
Apache Commons contains a lot of open source tools to solve the problems often encountered in programming, and reduce duplication of labor. I chose some of the more commonly used items to do a brief introduction. The text used a lot of online ready-made things, I just did a summary of the finishing.First, Commons beanutilsHttp://jakarta.apache.org/
Apache commons is an open-source project under Apache. It contains many open-source tools to solve common programming problems and reduce repetitive work.
This is the official Apache Commons website.
The following is a brief introduction to the tool:
Components
Catalog1 . Description2. Analysis3. POC4. Solution1. DescriptionMultipartstream.java in Apache Commons FileUpload before 1.3.1, as used in Apache Tomcat, JBoss Web, and other products, a Llows remote attackers to cause a denial of service (infinite loop and CPU consumption) via a crafted Content-type header That bypasses a loop ' s intended exit conditionsThe
Http://developer.51cto.com/art/201511/496849.htm
The Apache Commons contains a number of open source tools for solving problems that are often encountered in programming and reducing duplication of effort. I chose some more commonly used items to do a brief introduction. The article used a lot of online ready-made things, I just did a summary of the finishing.
First,
changes.
The following are the components contained in the Apache Commons:
Component
Description
Latest Version
Release date
BCEL
Bytecode Engineering Development Library: Analyzing, creating, and manipulating Java class files.
5.2
2007-06-14
Beanutils
Packaging for the Java Reflection and Self-Test (introspection) API makes it easier to use.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.