This is a mirror of official site: http://jasper-net.blogspot.com/

Common uses of Apache Commons

| Monday, July 4, 2011
Apache Commons is a collection of reusable java components which extends the official java functionality. These libraries helped me to reduce my code complexity.
Here I am listing down some handy methods that I used in my projects.

1.StringUtils

a) IsEmpty/IsBlank - checks if a String contains text
b) Trim/Strip - removes leading and trailing whitespace
c) Split/Join - splits a String into an array of substrings and vice versa
d) IsAlpha/IsNumeric/IsWhitespace/IsAsciiPrintable - checks the characters in a String


2.BeanUtils

a) copyProperties(Object dest, Object orig) Copy property values from the origin bean to the destination bean for all cases where the property names are the same.
b) describe(Object bean) Return the entire set of properties for which the specified bean provides a read method.
c) populate(Object bean, Map properties) Populate the JavaBeans properties of the specified bean, based on the specified name/value pairs.

Read more: Semantic Eyes
QR: common-uses-of-apache-commons-1.html

Posted via email from Jasper-net

0 comments: