Skip to content
Snippets Groups Projects
Commit e17cf7f9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

debug added

parent 3001676b
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!386Resolve "Continous integration tests"
Pipeline #6330 canceled
......@@ -249,44 +249,33 @@ public class MiRNAParser extends CachableInterface implements IExternalService {
* thrown when there is a problem with accessing mirna data file
*/
private InputStream getSourceInputStream() throws IOException {
new Exception().printStackTrace();
if (this.sourceInputStream == null) {
this.sourceInputStream = new ByteArrayOutputStream();
if (!bigFileCache.isCached(URL_SOURCE_DATABASE)) {
logger.debug("downloading xls file with mirna");
try {
bigFileCache.downloadFile(URL_SOURCE_DATABASE, false, new IProgressUpdater() {
@Override
public void setProgress(double progress) {
logger.debug("Progress: " + progress);
}
});
} catch (URISyntaxException e) {
throw new IOException("Problem with downloading file: " + URL_SOURCE_DATABASE, e);
}
logger.debug("File downloaded");
} else {
logger.debug("xls file with mirna in cache");
}
logger.debug("breakpoint 1");
String filename = bigFileCache.getAbsolutePathForFile(URL_SOURCE_DATABASE);
logger.debug("breakpoint 2");
byte[] buffer = new byte[BUFFER_SIZE];
logger.debug("breakpoint 3");
int len;
logger.debug("breakpoint 4");
InputStream stream = new FileInputStream(new File(filename));
logger.debug("breakpoint 5 " + new File(filename).length());
try {
while ((len = stream.read(buffer)) > -1) {
logger.debug("breakpoint 6 " + len);
this.sourceInputStream.write(buffer, 0, len);
}
} finally {
stream.close();
}
logger.debug("breakpoint 7");
this.sourceInputStream.flush();
logger.debug("breakpoint 8");
}
return new ByteArrayInputStream(sourceInputStream.toByteArray());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment