From: hansonr Date: Wed, 27 Jun 2018 12:02:24 +0000 (+0100) Subject: JAL-3026 FileParser for JFileChooser results as ByteArrayInputStream; X-Git-Tag: Release_2_11_4_0~45^2~18^2~628 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=685b0a8164c4cd8ba50abb4eb0ea55edf26705fe;p=jalview.git JAL-3026 FileParser for JFileChooser results as ByteArrayInputStream; does not imply text. --- diff --git a/src/jalview/io/FileParse.java b/src/jalview/io/FileParse.java index 7e1940f..bb03b35 100755 --- a/src/jalview/io/FileParse.java +++ b/src/jalview/io/FileParse.java @@ -27,6 +27,7 @@ import jalview.api.FeatureSettingsModelI; import jalview.util.MessageManager; import java.io.BufferedReader; +import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileReader; @@ -348,7 +349,7 @@ public class FileParse { // this will be from JavaScript inFile = file; - dataIn = new BufferedReader(new StringReader(new String(bytes))); + dataIn = new BufferedReader(new java.io.InputStreamReader(new ByteArrayInputStream(bytes))); dataName = fileStr; } else if (checkFileSource(fileStr)) @@ -384,8 +385,8 @@ public class FileParse * */ - System.out.println(data); dataIn = Rdr.getBR(data); + dataName = fileStr; }