Prepare switch to java 7 nio