Home » Core Java » apache » Page 4

apache

org.apache.commons.lang3.ClassPathUtils Example

In this example we are going to elaborate the use of the ClassPathUtils class in the package: org.apache.commons.lang3 or previouslyorg.apache.commons.lang, as the package name says, it is a member of the Apache Commons Lang, and deals with the classpaths. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The methods of this ...

Read More »

org.apache.commons.lang3.CharUtils Example

In this example we are going to elaborate the use of the CharUtils class in the package: org.apache.commons.lang3 or previously org.apache.commons.lang, as the package name says, it is a member of the Apache Commons Lang, and deals with Character (char) Manipulation. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The ...

Read More »

org.apache.commons.lang3.math.NumberUtils Example

Hey folks, this post is about a Math Package:NumberUtils.It has few handful of utility methods. All methods are static, so you don’t have to create an instance of it.  It resides in org.apache.commons.lang3.math.NumberUtils package. You can download the jar from http://commons.apache.org/proper/commons-lang/.               Or using Maven <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.3.2</version> and an import is necessary import ...

Read More »

org.apache.commons.io.comparator.PathFileComparator Example

Apache Commons IO is a library of utilities to assist with developing IO functionality. org.apache.commons.io.comparator package provides various Comparator implementations for Files. PathFileComparator is one of the classes. This class can be used to sort lists or arrays of files (File objects) by their path. The path value is a String returned from the File class’s getPath() method. The sort ...

Read More »

org.apache.commons.io.comparator.CompositeFileComparator Example

Apache Commons IO is a library of utilities to assist with developing IO functionality. org.apache.commons.io.comparator package provides various Comparator implementations for Files. CompositeFileComparator is one of the classes. This class can be used to sort lists or arrays of files (File objects) by combining a number of other comparators defined within the same package (DirectoryFileComparator, ExtensionFileComparator, LastModifiedFileComparator, NameFileComparator, PathFileComparator, SizeFileComparator). ...

Read More »

org.apache.commons.lang3.StringUtils Example

In this example we are going to elaborate the use of the StringUtils class in the package: org.apache.commons.lang3.StringUtils or previously org.apache.commons.lang.StringUtils, as the package name says, it is a member of the Apache Commons Lang, and deals with String Manipulation. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The methods of ...

Read More »

org.apache.commons.io.FilenameUtils Example

Apache Commons IO is a library of utilities to assist with developing IO functionality. org.apache.commons.io package has utility classes to perform common tasks. FilenameUtils is one of the classes. This class has static methods for filename and filepath manipulation. This class aims to help avoid those problems related with moving file names used in unix and Windows environments. This article ...

Read More »

org.apache.commons.io.IOUtils Example

In this example we are going to elaborate the use of the IOUtils class in the package: ‘org.apache.commons.io’, as the package name says it is a part of Apache Commons IO. All members functions of this class deals with Input – Output streams Manipulations, and it really helps to write programs which deals with such matters. The methods of this ...

Read More »

org.apache.commons.io.monitor.FileAlterationMonitor Example

In this example we shall show you how to make use of FileAlterationMonitor class, FileAlterationMonitor comes from the FileMonitor API of the Commons IO library which provided by the Apache Foundation. It spawns a monitoring thread triggering any registered FileAlterationObserver at a specified interval. A FileAlterationObserver represents the state of files below a root directory, checking the filesystem and notifying FileAlterationListener of create, ...

Read More »

org.apache.commons.io.FileUtils Example

In this example we are going to show some of the capabilities of the FileUtils class, which is a part of Apache Commons IO. The methods implemented in this class are all about file manipulation, and in many cases they make a developer’s life much easier. The main reason that this and other classes in Apache Commons exist, is that ...

Read More »