服务器一
/**
* 将存放在sourceFilePath目录下的源文件,读取成字节码
* @return
*/
public List<Map<String,Object>> download(String sourceFilePath) {
File sourceFile = new File(sourceFilePath); //读取的文件路径
FileInputStream fis = null;
BufferedInputStream bis = null;
List<Map<String,Object>> list = new ArrayList<>();
if(sourceFile.exists() == false){
log.debug("待压缩的文件目录:"+sourceFilePath+"不存在.");
sourceFile.mkdir(); // 新建目录
}
try {
File[] sourceFiles = sourceFile.listFiles();
if(null == sourceFiles || sourceFiles.length<1){
log.debug("待压缩的文件目录:" + sourceFilePath + "里面不存在文件,无需压缩.");
}else{
for(int i=0;i<sourceFiles.length;i