Top 16 Java Utility Class Library

Source: Internet
Author: User
Tags addall

(Reproduced: http://www.hollischuang.com/archives/1606)

GitHub Address: Https://github.com/liufeiSAP/javaStudy.git

In Java, there are a number of more useful class libraries, and they usually define a series of methods with common functionality. This article summarizes the most common Java utility classes and their most commonly used methods. Methods in both classes and classes are sorted by popularity.

The classes and methods listed in this paper are common libraries and methods which have been used in a lot of practice, and we can use them directly. Of course, the functionality of these methods can be implemented by ourselves, but since there are already very mature methods available for us to use, we do not need to define them. Many classes and methods through their names can actually understand exactly what to do. Each method has a link to see how they are specifically used in open source code.

The following list is based on the analysis of 50K open source projects.

1. Org.apache.commons.io.IOUtils
    • Closequietly ()
    • ToString ()
    • Copy ()
    • Tobytearray ()
    • Write ()
    • Toinputstream ()
    • ReadLines ()
    • Copylarge ()
    • Lineiterator ()
    • Readfully ()
2. Org.apache.commons.io.FileUtils
    • DeleteDirectory ()
    • Readfiletostring ()
    • Deletequietly ()
    • CopyFile ()
    • Writestringtofile ()
    • Forcemkdir ()
    • Write ()
    • Listfiles ()
    • CopyDirectory ()
    • Forcedelete ()
3. Org.apache.commons.lang.StringUtils
    • IsBlank ()
    • Isnotblank ()
    • IsEmpty ()
    • Isnotempty ()
    • Equals ()
    • Join ()
    • Split ()
    • EMPTY
    • Trimtonull ()
    • Replace ()
4. Org.apache.http.util.EntityUtils
    • ToString ()
    • Consume ()
    • Tobytearray ()
    • Consumequietly ()
    • Getcontentcharset ()
5. Org.apache.commons.lang3.StringUtils
    • IsBlank ()
    • Isnotblank ()
    • IsEmpty ()
    • Isnotempty ()
    • Join ()
    • Equals ()
    • Split ()
    • EMPTY
    • Replace ()
    • Capitalize ()
6. Org.apache.commons.io.FilenameUtils
    • GetExtension ()
    • Getbasename ()
    • GetName ()
    • Concat ()
    • Removeextension ()
    • Normalize ()
    • Wildcardmatch ()
    • Separatorstounix ()
    • GetFullPath ()
    • Isextension ()
7. Org.springframework.util.StringUtils
    • HasText ()
    • Haslength ()
    • IsEmpty ()
    • Commadelimitedlisttostringarray ()
    • Collectiontodelimitedstring ()
    • Replace ()
    • Delimitedlisttostringarray ()
    • Uncapitalize ()
    • Collectiontocommadelimitedstring ()
    • Tokenizetostringarray ()
8. Org.apache.commons.lang.ArrayUtils
    • Contains ()
    • AddAll ()
    • Clone ()
    • IsEmpty ()
    • Add ()
    • Empty_byte_array
    • Subarray ()
    • IndexOf ()
    • Isequals ()
    • Toobject ()
9. Org.apache.commons.lang.StringEscapeUtils
    • Escapehtml ()
    • Unescapehtml ()
    • EscapeXML ()
    • Escapesql ()
    • Unescapejava ()
    • Escapejava ()
    • Escapejavascript ()
    • Unescapexml ()
    • Unescapejavascript ()
Ten. Org.apache.http.client.utils.URLEncodedUtils
    • Format ()
    • Parse ()
Org.apache.commons.codec.digest.DigestUtils.
    • Md5hex ()
    • Shahex ()
    • Sha256hex ()
    • Sha1hex ()
    • SHA ()
    • MD5 ()
    • Sha512hex ()
    • SHA1 ()
Org.apache.commons.collections.CollectionUtils.
    • IsEmpty ()
    • Isnotempty ()
    • Select ()
    • Transform ()
    • Filter ()
    • Find ()
    • Collect ()
    • Foralldo ()
    • AddAll ()
    • Isequalcollection ()
Org.apache.commons.lang3.ArrayUtils.
    • Contains ()
    • IsEmpty ()
    • Isnotempty ()
    • Add ()
    • Clone ()
    • AddAll ()
    • Subarray ()
    • IndexOf ()
    • Empty_object_array
    • Empty_string_array
Org.apache.commons.beanutils.PropertyUtils.
    • GetProperty ()
    • SetProperty ()
    • Getpropertydescriptors ()
    • IsReadable ()
    • Copyproperties ()
    • Getpropertydescriptor ()
    • Getsimpleproperty ()
    • IsWriteable ()
    • Setsimpleproperty ()
    • Getpropertytype ()
Org.apache.commons.lang3.StringEscapeUtils.
    • UNESCAPEHTML4 ()
    • ESCAPEHTML4 ()
    • EscapeXML ()
    • Unescapexml ()
    • Escapejava ()
    • Escapeecmascript ()
    • Unescapejava ()
    • Escapejson ()
    • ESCAPEXML10 ()
Org.apache.commons.beanutils.BeanUtils.
    • Copyproperties ()
    • GetProperty ()
    • SetProperty ()
    • Describe ()
    • Populate ()
    • Copyproperty ()
    • Clonebean ()

Top 16 Java Utility Class Library

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.