Java 7: Path vs File -


for new applications written in java 7, there reason use java.io.file object more or can consider deprecated?

i believe java.nio.file.path can java.io.file can , more.

long story short:

java.io.file never deprecated / unsupported. said, java.nio.file.path part of more modern java.nio.file lib, , java.io.file can, in better way, , some.

for new projects, use path.

and if ever need file object legacy, call path#tofile()

migrating file path

this oracle page highlights differences, , maps java.io.file functionality java.nio.file lib (including path) functionality

article janice j. heiss , sharon zakhour, may 2009, discussing nio.2 file system in jdk 7


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -