protected void getPages() throws FTPServerTimeoutException, FTPServerException, NoFTPServiceException { // Setup the ftp server FtpServer ftp; try { ftp = (FtpServer) Class.forName(Registry.getFTPService()).newInstance(); ftp.setServer(Registry.getUrl()); ftp.setPassword(Registry.getFtpPassword()); ftp.setUserName(Registry.getFtpUserName()); ftp.setPassive(Registry.usePassive()); ftp.setTimeout(Registry.getFtpTimeout()); // get the pages and store them in the _workingDir _pages = ftp.getFiles(getWssrdDocumentName(), _workingDir); if ((_pages.length == 1) && _pages[0].endsWith(".PDF")) { _fileType = PDF_FILETYPE; } } catch (InstantiationException e) { log.warn(e.getMessage()); throw new NoFTPServiceException(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } }