| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Commons IO

Page history last edited by Manuel Kueblboeck 14 years, 6 months ago

Commons IO is a library of utilities to assist with developing IO functionality.

There are four main areas included:

  • Utility classes - with static methods to perform common tasks
  • Filters - various implementations of file filters
  • Comparators - various implementations of java.util.Comparator for files
  • Streams - useful stream, reader and writer implementations

 

Example:

Read a file: String fileContent = FileUtils.readFileToString(file);

Read a stream: String streamContent = IOUtils.toString(inputStream);

 

It doesn't get much easier than that.

 

Comments (0)

You don't have permission to comment on this page.