*/
package jalview.io;
-import jalview.api.AlignExportSettingI;
+import jalview.api.AlignExportSettingsI;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureSettingsModelI;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
/**
* specific settings for exporting data from the current context
*/
- private AlignExportSettingI exportSettings;
+ private AlignExportSettingsI exportSettings;
/**
* sequence counter for FileParse object created from same data source
private void parse(File file, String fileStr, DataSourceType sourceType,
boolean isFileObject) throws MalformedURLException, IOException
{
- /**
- * @j2sNative
- *
- * this.bytes = file && file._bytes;
- *
- */
+ bytes = Platform.getFileBytes(file);
this.dataSourceType = sourceType;
error = false;
}
else if (sourceType == DataSourceType.RELATIVE_URL)
{
- /**
- * BH 2018 hack for no support for access-origin
- *
- * @j2sNative
- *
- * this.bytes = swingjs.JSToolkit.getFileAsBytes(fileStr);
- *
- */
-
+ bytes = Platform.getFileAsBytes(fileStr);
dataIn = new BufferedReader(new java.io.InputStreamReader(new ByteArrayInputStream(bytes)));
dataName = fileStr;
/**
* @return the currently configured exportSettings for writing data.
*/
- public AlignExportSettingI getExportSettings()
+ public AlignExportSettingsI getExportSettings()
{
return exportSettings;
}
* @param exportSettings
* the exportSettings to set
*/
- public void setExportSettings(AlignExportSettingI exportSettings)
+ public void setExportSettings(AlignExportSettingsI exportSettings)
{
this.exportSettings = exportSettings;
}