Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void convert(String x) {
- try {
- getPath();
- System.out.println(x);
- URL source = new URL(x);
- source.openConnection();
- BufferedReader linkChecker = new BufferedReader(
- new InputStreamReader(source.openStream()));
- @SuppressWarnings("unused")
- String download;
- //while ((download = linkChecker.readLine()) != null) {
- // System.out.println(download);
- ReadableByteChannel rbc = Channels.newChannel(source
- .openStream());
- FileOutputStream fos = new FileOutputStream(fileName);
- fos.getChannel().transferFrom(rbc, 0, 1 << 24);
- linkChecker.close();
- //}
- } catch (IOException IOE) {
- }
- }
Add Comment
Please, Sign In to add comment