@Test public void testUnknownSystIdentifier() { this.parser = new FTPParserSelector().getParser("Digital Domain FTP"); FTPFile parsed; parsed = parser.parseFTPEntry( "drwxrwxrwx folder 0 Jan 19 20:36 Mastered 1644" ); assertNotNull(parsed); assertEquals("Mastered 1644", parsed.getName()); assertEquals(FTPFile.DIRECTORY_TYPE, parsed.getType()); parsed = parser.parseFTPEntry( "-rwxrwxrwx 0 208143684 208143684 Jan 14 02:13 Dhannya dhannya.rar" ); assertNotNull(parsed); assertEquals("Dhannya dhannya.rar", parsed.getName()); assertEquals(FTPFile.FILE_TYPE, parsed.getType()); parsed = parser.parseFTPEntry( "drwxr-xr-x folder 0 Jan 14 16:04 Probeordner"); assertNotNull(parsed); assertEquals("Probeordner", parsed.getName()); assertEquals(FTPFile.DIRECTORY_TYPE, parsed.getType()); }
@Override public FTPFile parseFTPEntry(String entry) { if(matches(entry)) { String typeStr = group(1); String filesize = group(18); String datestr = group(19) + " " + group(20); String name = group(21); String endtoken = group(22); return parseFTPEntry(typeStr, null, null, filesize, datestr, name, endtoken); } return null; }
RumpusFTPEntryParser extends CommonUnixFTPEntryParser { @Override public FTPFile parseFTPEntry(String entry) { if(matches(entry)) { String typeStr = group(1); String filesize = group(18); String datestr = group(19) + " " + group(20); String name = group(21); String endtoken = group(22); return parseFTPEntry(typeStr, null, null, filesize, datestr, name, endtoken); } return null; } }
RumpusFTPEntryParser extends CommonUnixFTPEntryParser { @Override public FTPFile parseFTPEntry(String entry) { if(matches(entry)) { String typeStr = group(1); String filesize = group(18); String datestr = group(19) + " " + group(20); String name = group(21); String endtoken = group(22); return parseFTPEntry(typeStr, null, null, filesize, datestr, name, endtoken); } return null; } RumpusFTPEntryParser(); }
RumpusFTPEntryParser extends CommonUnixFTPEntryParser { @Override public FTPFile parseFTPEntry(String entry) { if(matches(entry)) { String typeStr = group(1); String filesize = group(18); String datestr = group(19) + " " + group(20); String name = group(21); String endtoken = group(22); return parseFTPEntry(typeStr, null, null, filesize, datestr, name, endtoken); } return null; } RumpusFTPEntryParser(); @Override FTPFile parseFTPEntry(String entry); }
RumpusFTPEntryParser extends CommonUnixFTPEntryParser { @Override public FTPFile parseFTPEntry(String entry) { if(matches(entry)) { String typeStr = group(1); String filesize = group(18); String datestr = group(19) + " " + group(20); String name = group(21); String endtoken = group(22); return parseFTPEntry(typeStr, null, null, filesize, datestr, name, endtoken); } return null; } RumpusFTPEntryParser(); @Override FTPFile parseFTPEntry(String entry);  }