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 Class Description ByteOrderMarkByte Order Mark (BOM) representation - see
ByteOrderParserConverts Strings to
CharsetsCharsets required of every implementation of the Java platform. CopyUtils Deprecated.Use IOUtils. DirectoryWalker<T>Abstract class that walks through a directory hierarchy and provides subclasses with convenient hooks to add specific behavior. EndianUtilsUtility code for dealing with different endian systems. FileCleaner Deprecated. FileCleaningTrackerKeeps track of files awaiting deletion, and deletes them when an associated marker object is reclaimed by the garbage collector. FileDeleteStrategyStrategy for deleting files. FilenameUtilsGeneral file name and file path manipulation utilities. FileSystemUtils Deprecated.As of 2.6 deprecated without replacement. FileUtilsGeneral file manipulation utilities. HexDumpDumps data in hexadecimal format. IOUtilsGeneral IO stream manipulation utilities. LineIteratorAn Iterator over the lines in a
Enum Summary Enum Description FileSystemAbstracts an OS' file system details, currently supporting the single use case of converting a file name String to a legal file name with
IOCaseEnumeration of IO case sensitivity.
Exception Summary Exception Description DirectoryWalker.CancelExceptionCancelException is thrown in DirectoryWalker to cancel the current processing. FileExistsExceptionIndicates that a file already exists. IOExceptionListA IOException based on a list of Throwable causes. IOExceptionWithCause Deprecated.(since 2.5) use
IOIndexedExceptionA IOException associated with a source index. TaggedIOExceptionAn
IOExceptiondecorator that adds a serializable tag to the wrapped exception.