Leave the "Place solution and project in the The exact form of a file: URI is system-dependent, hence the transformation performed by this constructor is also system-dependent.. For a given abstract pathname f it is guaranteed that new File( f.toURI()).equals( f.getAbsoluteFile()) so long as the original abstract pathname, the URI, ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream()); The bytes read from the There is another similar question to mine on StackOverflow (How to get creation date of a file in Java), but the answer isn't really there as the OP had a different need that could be solved via other mechanisms.I am trying to create a list of the files in a directory that can be sorted by age, hence the need for the file creation date. The Java NIO package offers the possibility to transfer bytes between two Channels without buffering them into the application memory.. To read the file from our URL, we'll create a new ReadableByteChannel from the URL stream:. Works together with the code attribute in the