从服务器JSF下载文件

时间:2014-05-19 09:42:10

标签: java spring jsf jboss seam

我已将代码更改为将文件上传到服务器而不是存储在数据库中。对于我的下载代码,我想检查数据库中的文件是否没有内容,它应该从服务器读取内容然后写入内容。 我应该在这里使用什么代码?

@Transient
public byte[] getContent() {
    if (content == null){
        //Open the file. Read the contents. Save the contents in content
    }
    return this.content;
}

0 个答案:

没有答案