All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jeesuite.filesystem.provider.AbstractProvider Maven / Gradle / Ivy

There is a newer version: 1.3.6
Show newest version
/**
 * 
 */
package com.jeesuite.filesystem.provider;

import com.jeesuite.filesystem.FSProvider;
import com.jeesuite.filesystem.utils.HttpDownloader;

/**
 * @description 
* @author vakin * @date 2017年1月7日 */ public abstract class AbstractProvider implements FSProvider{ protected static final String DIR_SPLITER = "/"; protected String urlprefix; protected String bucketName; @Override public String getPath(String fileName) { try { String url = getFullPath(fileName); if (HttpDownloader.read(url) == null) { throw new FSOperErrorException(name(), "文件不存在"); } return url; } catch (Exception e) { throw new FSOperErrorException(name(), e); } } protected String getFullPath(String key) { return urlprefix + key; } public abstract String name(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy