Files offer random access.
Files can be created, removed, overwritten and appended. They don't depend on Java. For example, a LineNumberInputStream passes bytes through verbatim but counts line terminators as they are read. Certain operations on the file system, such as renaming and deleting files, are done by this class rather than through streams. There are two interfaces, DataInput and DataOutput that support the transfer of data other than bytes or characters, such as long integers, floating-point numbers and strings.