2012년 9월 26일 수요일

java 7 달라진 점 정리 중

import java.io.file;
...

File file = new File("index.html");

~ java 6

import java.nio.file.Path;
import java.nio.file.Paths;
...

Path path = Paths.get("index.html");

JAVA 7!!


Path path = Paths.get("D:", "newFoler", "index.txt");
or
Path path = Paths.get("D:/newFolder/index.txt");

both available.

same driver
/xxxx/yyyy
same folder
xxxx/yyyy


nomalized() : make "."& ".." to simple

getRoot() not exist : return null;

path.getParent()

getNameCount() subfolders and files.
getName()



Subpath(start, end)
path.toUri(); for webbrowser.

path.toRealPath : not a simbol link.

댓글 없음:

댓글 쓰기

국정원의 댓글 공작을 지탄합니다.

UPBIT is a South Korean company, and people died of suicide cause of coin investment.

 UPBIT is a South Korean company, and people died of suicide cause of coin. The company helps the people who control the market price manipu...