Top Description Classes
[default module]

Package org.apache.commons.io


This package defines utility classes for working with streams, readers, writers and files. The most commonly used classes are described here:

IOUtils is the most frequently used class. It provides operations to read, write, copy and close streams.

FileUtils provides operations based around the JDK File class. These include reading, writing, copying, comparing and deleting.

FilenameUtils provides utilities based on filenames. This utility class manipulates filenames without using File objects. It aims to simplify the transition between Windows and Unix. Before using this class however, you should consider whether you should be using File objects.

FileSystemUtils allows access to the filing system in ways the JDK does not support. At present this allows you to get the free space on a drive.

EndianUtils swaps data between Big-Endian and Little-Endian formats.

Class Summary

Modifier and TypeClass and Description
public class
CopyUtils

Deprecated Use IOUtils. Will be removed in 2.0. Methods renamed to IOUtils.write() or IOUtils.copy(). Null handling behaviour changed in IOUtils (null data does not throw NullPointerException).
This class provides static utility methods for buffered copying between sources (InputStream, Reader, String and byte[]) and destinations (OutputStream, Writer, String and byte[]).
public abstract class
DirectoryWalker

Abstract class that walks through a directory hierarchy and provides subclasses with convenient hooks to add specific behaviour.

public class
EndianUtils

Utility code for dealing with different endian systems.

public class
FileCleaner

Keeps track of files awaiting deletion, and deletes them when an associated marker object is reclaimed by the garbage collector.

public class
FileCleaningTracker

Keeps track of files awaiting deletion, and deletes them when an associated marker object is reclaimed by the garbage collector.

public class
FileDeleteStrategy

Strategy for deleting files.

public class
FilenameUtils

General filename and filepath manipulation utilities.

public class
FileSystemUtils

General File System utilities.

public class
FileUtils

General file manipulation utilities.

public class
HexDump

Dumps data in hexadecimal format.

public class
IOCase

Enumeration of IO case sensitivity.

public class
IOUtils

General IO stream manipulation utilities.

public class
LineIterator

An Iterator over the lines in a Reader.