Esempio n. 1
0
 /**
  * Return a default configuration StreamManager with a {@link LocatorFile}, {@link LocatorHTTP},
  * {@link LocatorFTP} and {@link LocatorClassLoader}
  */
 public static StreamManager makeDefaultStreamManager() {
   StreamManager streamManager = new StreamManager();
   streamManager.addLocator(new LocatorFile(null));
   streamManager.addLocator(new LocatorHTTP());
   streamManager.addLocator(new LocatorFTP());
   streamManager.addLocator(new LocatorClassLoader(streamManager.getClass().getClassLoader()));
   streamManager.setLocationMapper(JenaIOEnvironment.getLocationMapper());
   return streamManager;
 }
Esempio n. 2
0
 private static StreamManager clone(StreamManager other) {
   StreamManager sm = new StreamManager();
   sm.handlers.addAll(other.handlers);
   sm.mapper = other.mapper == null ? null : other.mapper.clone();
   return sm;
 }