{
try
{
if ("tgz".equalsIgnoreCase(getRootName().getScheme()))
{
return new TarInputStream(new GZIPInputStream(new FileInputStream(file)));
}
else if ("tbz2".equalsIgnoreCase(getRootName().getScheme()))
{
return new TarInputStream(Bzip2FileObject.wrapInputStream(file.getAbsolutePath(), new FileInputStream(file)));
}
return new TarInputStream(new FileInputStream(file));
}
catch (IOException ioe)
{
throw new FileSystemException("vfs.provider.tar/open-tar-file.error", file, ioe);
}