public InputStream download(String artifact,String version) throws IOException {
  Path path=getArtifact(artifact,version);
  if (!Files.exists(path)) {
    throw new ArtifactNotFoundException(artifact,version);
  }
  return new BufferedInputStream(Files.newInputStream(path));
}

public InputStream download ( String artifact , String version ) throws IOException { Path path = getArtifact ( artifact , version ) ; if ( ! Files . exists ( path ) ) { throw new ArtifactNotFoundException ( artifact , version ) ; } return new BufferedInputStream ( Files . newInputStream ( path ) ) ; }
downloads artifact from the repository .
