URL로 ftp 접근하기
언제부터 이렇게 된건지 모르겠지만.
URL url = new URL(”ftp://rath:********@xrath.com/hehefile.zip“);
URLConnection con = url.openConnection();
InputStream in = con.getInputStream();
out.println( in.available() );
in.close();
이렇게 되더라.
위처럼 ftp도 되고, ftp, jar, http, https 다 되더라.
jar일 경우는 spec이 어떻게 지원되는지는 모르겠지만,
뒤에 !가 붙고 그 안에서 protocol을 또 넣을 수 있군.
Categories: Development
오호.. 좋은정보!