[#2] Remove java.nio usage