그럴경우 간단한 방법이 있다.
try{
java.net.URL downLink = new java.net.URL("다운로드링크 지정-input downloadLink(String type)");
java.nio.channels.ReadableByteChannel rbc = java.nio.channels.Channels.newChannel(downLink.openStream());
java.io.FileOutputStream outputStream = new java.io.FileOutputStream("파일명.확장자(ex.fileName.txt)");
outputStream.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
}catch(java.io.IOException e){
e.printStackTrace();
}
posted by Culinary developer