SimplePullDataSource implements ISageTVDataSource { String getPath(String uri) { if (uri == null) return null; if (!uri.contains("stv: int pos = uri.indexOf("/", "stv: log.debug("PATH: {}({})", uri, pos); return uri.substring(pos + 1); } SimplePullDataSource();  SimplePullDataSource(String host); String getUri(); @Override long open(String uri); @Override void close(); @Override long size(); boolean isOpen(); @Override int read(long position, byte[] buffer, int offset, int len); int fetch(long position, byte[] buffer, int offset, int len);  }
@Test public void testGetPath() throws Exception { SimplePullDataSource ds = new SimplePullDataSource(); assertEquals("/a/b/c/d.avi", ds.getPath("stv: assertEquals("D:\\Music\\FC Kahuna - Machine Says Yes\\(1) Hayling.wav", ds.getPath("stv: }