コード例 #1
0
 @Override
 public Iterator<InputStream> open(ResourceHandle handle) throws IOException {
   if (handle instanceof FileHandle) {
     return Collections.singletonList(((FileHandle) handle).openStream()).iterator();
   }
   return Collections.<InputStream>emptyList().iterator();
 }
コード例 #2
0
 @Override
 public Iterable<ResourceHandle> children(ResourceHandle handle) throws IOException {
   if (handle instanceof DirectoryHandle) {
     return ((DirectoryHandle) handle).members();
   }
   return Collections.emptySet();
 }