public InputStream getInputStream(String uriStr) throws IOException { | ||||
File file = getFile(uriStr); | ||||
if (file != null) { | ||||
try { | ||||
return new BufferedInputStream(Compression.getUncompressedFileInputStream(file)); | ||||
} catch (FileNotFoundException e) { | ||||
throw new IOException(tr("File ''{0}'' does not exist.", file.getPath()), e); | ||||
} | ||||
} else if (inZipPath != null) { | ||||
ZipEntry entry = zipFile.getEntry(inZipPath); | ||||
if (entry != null) { | ||||
return zipFile.getInputStream(entry); | ||||
} | ||||
} | ||||
throw new IOException(tr("Unable to locate file ''{0}''.", uriStr)); | ||||
} | ||||
|
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/1bd37b8f-b573-49fe-a353-525a05915407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tibor Blenessy | SonarSource
SonarJava Developer