Java Virtal

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

56789 1011

[ Archives News
for 'Java Technology' ]

home > news > java technology > introducing nio.2 (jsr 203) part 2: the basics

Introducing NIO.2 (JSR 203) Part 2: The Basics

In this part we will discuss the basic classes that we will will work with them to have file system operations like copying a file, dealing with symbolic links, deleting a file, and so on. I will write a seperate entry to introduce classess which are new to Java 7 for dealing with sreams and file contents, watching service and directory tree walking. If you want to know what are new features in Java SE 7 for dealing with IO take a look at  Introducing NIO.2 (JSR 203) Part 1: What are new features? Before NIO.2, dealing with file system was mainly done using the File class and no other base class were available. In NIO.2 it there are some new classes at our disposal to take advantage of thier existance to do our job.  FileSystems: Everythign starts with this factory class. We use this class to get an instance of the FileSystem we want to work on. The nio.2 provides a SPI to develope support for new file systems. for example an in-memory file system, a ZIP file system and so on. Following two methods are most important methods in FileSystems class. The getDefault() returns the default file system available to the JVM. usually the operating system default file system. The getFileSystem(URI uri) returns a file system from the set of available file system providers that match the given uir schema. Path: This is the abstract class which provides us with all File system functionalities we may need to perform ove...

Date: June, 01 2010

Others News

© free web design software | website designer | website generator | free icon maker | css menu