search
Home类库下载java类库Top 16 Java utility libraries

In Java, there are many practical class libraries, and they usually define a series of methods with common functions. This article summarizes the most commonly used utility classes in Java and their most commonly used methods. Both classes and methods within classes are sorted by popularity.

The classes and methods listed in this article are commonly used class libraries and methods that have gone through a lot of practice, and we can use them directly. Of course, we can implement the functions implemented by these methods ourselves, but since there are already very mature methods for us to use, there is no need to define them ourselves. Many classes and methods can actually understand what they do through their names. Each method has a link to see how it is used in open source code.

The following list is derived by analyzing 50K open source projects.

1. org.apache.commons.io.IOUtils

closeQuietly ( )

toString ( )

copy ( )

toByteArray ( )

write ( )

toInputStream ( )

readLines ( )

copyLarge ()

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.Entity Utils

toString ( )

consume ( )

toByteArray ( )

consumeQuietly ( )

getContentCharSet ( )

5. isNotBlank ( )

isEmpty ( )

isNotEmpty ( )

join ( )

equals ( )

split ( )

EMPTY

replace ( )

capitalize ( )

6. org.apache.commons.io.FilenameUtils

getExtension ()

getBaseName ()

isExtension ( )

7. org.springframework.util.StringUtils

hasText ( )

hasLength ( )

isEmpty ( )

commaDelimitedListToStringArray ( )

collectionToDelimitedString ( )

replace ( )

de limitedListToStringArray ( )

uncapitalize ( )

collectionToCommaDelimitedString ( )

tokenizeToStringArray ( )

8. org.apache.commons.lang.ArrayUtils

contains ( )

addAll ( )

clone ( )

isEmpty ( )

add ( )

EMPTY_BYTE_ARRAY

subarray ()

escapeXml ( )

escapeSql ( )

unescapeJava ( )

escapeJava ( )

escapeJavaScript ( )

unescapeXml ( )

unescapeJavaScript ( )

10. org.apache.http.client.utils.URLEncodedUtils

format ( )

parse ()

sha512Hex ()

sha1 ()

find ( )

collect ( )

forAllDo ( )

addAll ( )

isEqualCollection ( )

13. org.apache.commons.lang3.ArrayUtils

contains ( )

isEmpty ( )

isNotEmpty ( )

add ( )

clone ( )

addAll ( )

subarray ( )

indexOf ( )

EMPTY_OBJECT_ARRAY

EMPTY_STRING_ARRAY

14. org.apache.commons.beanutils .PropertyUtils

getProperty ( )

setProperty ( )

getPropertyDescriptors ( )

isReadable ( )

copyProperties ( )

getPropertyDescriptor ( )

getSimpleProperty ( )

isWriteable ( )

setSimpleProperty ( )

getPropertyType ( )

15. org. apache.commons.lang3.StringEscapeUtils

unescapeHtml4 ( )

escapeHtml4 ( )

escapeXml ( )

unescapeXml ( )

escapeJava ( )

escapeEcmaScript ( )

unescapeJava ( )

escapeJson ( )

escapeXml10 ( )

16. org.apache.commons.beanutils.BeanUtils

copyProperties ( )

getProperty ( )

setProperty ( )

describe ( )

populate ( )

copyProperty ( )

cloneBean ( )

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools