Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public static void convert(String x) {
  2. try {
  3. getPath();
  4. System.out.println(x);
  5. URL source = new URL(x);
  6. source.openConnection();
  7. BufferedReader linkChecker = new BufferedReader(
  8. new InputStreamReader(source.openStream()));
  9. @SuppressWarnings("unused")
  10. String download;
  11. //while ((download = linkChecker.readLine()) != null) {
  12. // System.out.println(download);
  13. ReadableByteChannel rbc = Channels.newChannel(source
  14. .openStream());
  15. FileOutputStream fos = new FileOutputStream(fileName);
  16. fos.getChannel().transferFrom(rbc, 0, 1 << 24);
  17. linkChecker.close();
  18. //}
  19. } catch (IOException IOE) {
  20.  
  21. }
  22. }
Add Comment
Please, Sign In to add comment