@Override
public StreamingOutput getArtifactStream(final IndexArtifact artifact, final String filename)
{
Path streamPath = fs.getPath(getPath() + artifact.getLocation() + "/" + filename);
if (Files.isReadable(streamPath))
{
return new StreamingOutput()
{
public void write(OutputStream os) throws IOException, WebApplicationException
{
FileInputStream fis = new FileInputStream(streamPath.toString());
ByteStreams.copy(fis, os);
fis.close();
}
};
}
else
{
throw new NotFoundException();
}
}
LocalStorage.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:hangar
作者:
评论列表
文章目录