@Test public void directoryListing() throws Exception { StringWriter out = new StringWriter(); out.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<start>\n"); DirectoryListing instance = new DirectoryListing(); instance.listTo("ctx", directory, out, directory.getPath(), Arrays.asList(directory.list())); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); assertNotNull("DocumentBuilderFactory is null", factory); DocumentBuilder builder = factory.newDocumentBuilder(); assertNotNull("DocumentBuilder is null", builder); out.append("</start>\n"); String str = out.toString(); Document document = builder.parse(new ByteArrayInputStream(str.getBytes())); NodeList nl = document.getElementsByTagName("tr"); int len = nl.getLength(); assertEquals(entries.length + 2, len); for (int i = 2; i < len; ++i) { validateEntry((Element) nl.item(i)); } }
public DirectoryListing() { desc = null; now = System.currentTimeMillis(); }
DirectoryListing { public DirectoryListing() { desc = null; now = System.currentTimeMillis(); } }
DirectoryListing { public DirectoryListing() { desc = null; now = System.currentTimeMillis(); } DirectoryListing();  DirectoryListing(EftarFileReader desc); }
DirectoryListing { public DirectoryListing() { desc = null; now = System.currentTimeMillis(); } DirectoryListing();  DirectoryListing(EftarFileReader desc); List<String> listTo(String contextPath, File dir, Writer out,
        String path, List<String> files); List<String> extraListTo(String contextPath, File dir, Writer out,
        String path, List<DirectoryEntry> entries); }
DirectoryListing { public DirectoryListing() { desc = null; now = System.currentTimeMillis(); } DirectoryListing();  DirectoryListing(EftarFileReader desc); List<String> listTo(String contextPath, File dir, Writer out,
        String path, List<String> files); List<String> extraListTo(String contextPath, File dir, Writer out,
        String path, List<DirectoryEntry> entries);  }