}\r
while (!entry.getName().equals(pdbId));\r
\r
- DataInputStream in = new DataInputStream(jin);\r
+ BufferedReader in = new BufferedReader(new InputStreamReader(jin));\r
File outFile = File.createTempFile("jalview_pdb", ".txt");\r
outFile.deleteOnExit();\r
- DataOutputStream out = new DataOutputStream(new FileOutputStream(outFile));\r
- int data;\r
- while ( (data = in.read()) != -1)\r
+ PrintWriter out = new PrintWriter(new FileOutputStream(outFile));\r
+ String data;\r
+\r
+ while ( (data = in.readLine()) != null)\r
{\r
- out.write(data);\r
+ out.println(data);\r
}\r
out.close();\r
return outFile.getAbsolutePath();\r