This commit is contained in:
Francesco Mangiacrapa 2013-04-22 13:17:02 +00:00
parent e5cbf10f83
commit d6af05efe7
1 changed files with 7 additions and 2 deletions

View File

@ -17,7 +17,8 @@ import org.gcube.contentmanager.storageclient.model.protocol.smp.Handler;
public class StorageUtil {
protected static GCUBELog logger = new GCUBELog(StorageUtil.class);
public static InputStream getInputStreamByStorageClient(String url) throws Exception {
//Storage version 1.0
// public static InputStream getInputStreamByStorageClient(String url) throws Exception {
// logger.trace("url :" + url);
//
@ -74,6 +75,10 @@ public class StorageUtil {
// is=client.get().RFileAStream(location);
// createFileTest(is);
// }
public static InputStream getInputStreamByStorageClient(String url) throws Exception {
Handler.activateProtocol();
URL smsHome = null;
@ -83,7 +88,7 @@ public class StorageUtil {
e1.printStackTrace();
}
URLConnection uc = null;
uc = ( URLConnection ) smsHome.openConnection ( );
uc = ( URLConnection ) smsHome.openConnection();
InputStream is=uc.getInputStream();
return is;
}