From 685b0a8164c4cd8ba50abb4eb0ea55edf26705fe Mon Sep 17 00:00:00 2001 From: hansonr Date: Wed, 27 Jun 2018 13:02:24 +0100 Subject: [PATCH] JAL-3026 FileParser for JFileChooser results as ByteArrayInputStream; does not imply text. --- src/jalview/io/FileParse.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 1.7.10.2