Making compatible with Java 6

Removing dependency on nio library of Java 7