刘光辉
3 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package jnpf.fileStorage.dms;
 
import jnpf.entity.FileParameter;
import jnpf.util.FileUploadUtils;
import org.springframework.stereotype.Component;
 
import java.io.InputStream;
import java.util.function.Consumer;
 
@Component
public class DmsCommonFileStorage {
    public boolean exists(String type, String fileName) {
        return FileUploadUtils.exists(new FileParameter(type, fileName));
    }
 
    public void download(String type, String fileName, Consumer<InputStream> consumer) {
        FileUploadUtils.downloadFile(new FileParameter(type, fileName), consumer);
    }
}