try { String union = "http://www.unioninvestment.de/preise.csv"; URL url = new URL(union); OutputStream out = new FileOutputStream("output.txt"); InputStream in = url.openStream(); int len; byte[] b = new byte[100]; while ((len = in.read(b)) != -1) { //Table.ta1.append(b +"0"+ len); out.write(b,0,len); //System.out.println(b +"0"+ len); } out.close(); in.close();} catch (MalformedURLException e) { System.err.println(e.toString()); //System.exit(1);} catch (IOException e) { System.err.println(e.toString()); //System.exit(1);}}