@Test(expected = AccessDeniedException.class) public void testParseNotFound() throws Exception { new FireFtpBookmarkCollection().read(new ProtocolFactory(Collections.emptySet()), new Local(System.getProperty("java.io.tmpdir"), "f")); }
protected void read(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { try (final BufferedReader in = new BufferedReader(new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8))) { String l; while((l = in.readLine()) != null) { Matcher array = Pattern.compile("\\[(.*?)\\]").matcher(l); while(array.find()) { Matcher entries = Pattern.compile("\\{(.*?)\\}").matcher(array.group(1)); while(entries.find()) { final String entry = entries.group(1); this.read(protocols, entry); } } } } catch(IOException e) { throw new AccessDeniedException(e.getMessage(), e); } }
FireFtpBookmarkCollection extends ThirdpartyBookmarkCollection { protected void read(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { try (final BufferedReader in = new BufferedReader(new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8))) { String l; while((l = in.readLine()) != null) { Matcher array = Pattern.compile("\\[(.*?)\\]").matcher(l); while(array.find()) { Matcher entries = Pattern.compile("\\{(.*?)\\}").matcher(array.group(1)); while(entries.find()) { final String entry = entries.group(1); this.read(protocols, entry); } } } } catch(IOException e) { throw new AccessDeniedException(e.getMessage(), e); } } }
FireFtpBookmarkCollection extends ThirdpartyBookmarkCollection { protected void read(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { try (final BufferedReader in = new BufferedReader(new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8))) { String l; while((l = in.readLine()) != null) { Matcher array = Pattern.compile("\\[(.*?)\\]").matcher(l); while(array.find()) { Matcher entries = Pattern.compile("\\{(.*?)\\}").matcher(array.group(1)); while(entries.find()) { final String entry = entries.group(1); this.read(protocols, entry); } } } } catch(IOException e) { throw new AccessDeniedException(e.getMessage(), e); } }  }
FireFtpBookmarkCollection extends ThirdpartyBookmarkCollection { protected void read(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { try (final BufferedReader in = new BufferedReader(new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8))) { String l; while((l = in.readLine()) != null) { Matcher array = Pattern.compile("\\[(.*?)\\]").matcher(l); while(array.find()) { Matcher entries = Pattern.compile("\\{(.*?)\\}").matcher(array.group(1)); while(entries.find()) { final String entry = entries.group(1); this.read(protocols, entry); } } } } catch(IOException e) { throw new AccessDeniedException(e.getMessage(), e); } }  @Override String getBundleIdentifier(); @Override String getName(); @Override Local getFile(); }
FireFtpBookmarkCollection extends ThirdpartyBookmarkCollection { protected void read(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { try (final BufferedReader in = new BufferedReader(new InputStreamReader(file.getInputStream(), StandardCharsets.UTF_8))) { String l; while((l = in.readLine()) != null) { Matcher array = Pattern.compile("\\[(.*?)\\]").matcher(l); while(array.find()) { Matcher entries = Pattern.compile("\\{(.*?)\\}").matcher(array.group(1)); while(entries.find()) { final String entry = entries.group(1); this.read(protocols, entry); } } } } catch(IOException e) { throw new AccessDeniedException(e.getMessage(), e); } }  @Override String getBundleIdentifier(); @Override String getName(); @Override Local getFile();  }