import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureSettingsModelI;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
private void parse(File file, String fileStr, DataSourceType sourceType,
boolean isFileObject) throws MalformedURLException, IOException
{
- /**
- * @j2sNative
- *
- * this.bytes = file && file._bytes;
- *
- */
- this.dataSourceType = sourceType;
+ bytes = Platform.getFileBytes(file);
+ dataSourceType = sourceType;
error = false;
if (sourceType == DataSourceType.FILE)
}
else if (sourceType == DataSourceType.RELATIVE_URL)
{
- /**
- * BH 2018 hack for no support for access-origin
- *
- * @j2sNative
- *
- * this.bytes = swingjs.JSUtil.getFileAsBytes$O(fileStr);
- *
- */
-
+ // BH 2018 hack for no support for access-origin
+ bytes = Platform.getFileAsBytes(fileStr);
dataIn = new BufferedReader(new java.io.InputStreamReader(new ByteArrayInputStream(bytes)));
dataName = fileStr;