public Iterator<InputStream> open(File handle) throws IOException { return Utils.<InputStream>iterator(new FileInputStream(handle)); } }
public Iterator<InputStream> open(Path handle) throws IOException { return Utils.<InputStream>iterator(new ByteArrayInputStream(entries.get(handle).getBytes("UTF-8"))); } }
public Iterator<InputStream> open(String handle) throws IOException { String realPath = ctx.getRealPath(handle); if (realPath != null) { File realFile = new File(realPath); if (realFile.exists() && realFile.isFile()) { return Utils.<InputStream>iterator(new FileInputStream(realFile)); } } return Utils.iterator(ctx.getResource(handle).openConnection().getInputStream()); }
Iterator<Resource> getResources() throws IOException { Iterator<InputStream> i = driver.open(handle); if (i.hasNext()) { LinkedList<Resource> resources = new LinkedList<Resource>(); while (i.hasNext()) { InputStream in = i.next(); byte[] bytes = Utils.readAsBytes(in); long lastModified = getLastModified(); resources.add(new Resource(name, bytes, lastModified)); } return resources.iterator(); } else { return Utils.iterator(); } }
public Iterator<InputStream> open(File handle) throws IOException { return Utils.<InputStream>iterator(new FileInputStream(handle)); } }
public Iterator<InputStream> open(File handle) throws IOException { return Utils.<InputStream>iterator(new FileInputStream(handle)); } }
public Iterator<InputStream> open(String handle) throws IOException { String realPath = ctx.getRealPath(handle); if (realPath != null) { File realFile = new File(realPath); if (realFile.exists() && realFile.isFile()) { return Utils.<InputStream>iterator(new FileInputStream(realFile)); } } return Utils.iterator(ctx.getResource(handle).openConnection().getInputStream()); }
public Iterator<InputStream> open(String handle) throws IOException { String realPath = ctx.getRealPath(handle); if (realPath != null) { File realFile = new File(realPath); if (realFile.exists() && realFile.isFile()) { return Utils.<InputStream>iterator(new FileInputStream(realFile)); } } return Utils.iterator(ctx.getResource(handle).openConnection().getInputStream()); }
public Iterator<InputStream> open(Path handle) throws IOException { return Utils.<InputStream>iterator(new ByteArrayInputStream(entries.get(handle).getBytes("UTF-8"))); } }
public Iterator<InputStream> open(Path handle) throws IOException { return Utils.<InputStream>iterator(new ByteArrayInputStream(entries.get(handle).getBytes("UTF-8"))); } }
Iterator<Resource> getResources() throws IOException { Iterator<InputStream> i = driver.open(handle); if (i.hasNext()) { LinkedList<Resource> resources = new LinkedList<Resource>(); while (i.hasNext()) { InputStream in = i.next(); byte[] bytes = Utils.readAsBytes(in); long lastModified = getLastModified(); resources.add(new Resource(name, bytes, lastModified)); } return resources.iterator(); } else { return Utils.iterator(); } }
Iterator<Resource> getResources() throws IOException { Iterator<InputStream> i = driver.open(handle); if (i.hasNext()) { LinkedList<Resource> resources = new LinkedList<Resource>(); while (i.hasNext()) { InputStream in = i.next(); byte[] bytes = Utils.readAsBytes(in); long lastModified = getLastModified(); resources.add(new Resource(name, bytes, lastModified)); } return resources.iterator(); } else { return Utils.iterator(); } }