Sunday, March 24, 2013


Java 7 nio - Examples

In this post I will demonstrate the work with major components in the NIO package.

Path

Path as its name implies is a representation of a system dependent file path.

Construct a Path by FileSystems:

Construct a Path by using the Paths utility class:



To list all files in a directory:


An example, create a folder Path and get data


An example, create a file Path and get data

Normalize a Path example


Working with sub Path

No comments:

Post a Comment