@Test public void testParseDevBundleLinesWithComment() throws IOException { try (InputStream stream = openFileStream("test-parse-dev-bundle-lines-with-comment.bundles")) { DevBundle[] devBundles = DevBundle.parseDevBundleLines(stream); assertEquals(0, devBundles.length); } }
public static DevBundle[] parseDevBundleLines(InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { List<DevBundle> bundles = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { bundles.add(parseDevBundleLine(line)); } } return bundles.toArray(new DevBundle[bundles.size()]); } }
DevBundle implements Serializable { public static DevBundle[] parseDevBundleLines(InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { List<DevBundle> bundles = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { bundles.add(parseDevBundleLine(line)); } } return bundles.toArray(new DevBundle[bundles.size()]); } } }
DevBundle implements Serializable { public static DevBundle[] parseDevBundleLines(InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { List<DevBundle> bundles = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { bundles.add(parseDevBundleLine(line)); } } return bundles.toArray(new DevBundle[bundles.size()]); } } DevBundle(String path, DevBundleType devBundleType); }
DevBundle implements Serializable { public static DevBundle[] parseDevBundleLines(InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { List<DevBundle> bundles = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { bundles.add(parseDevBundleLine(line)); } } return bundles.toArray(new DevBundle[bundles.size()]); } } DevBundle(String path, DevBundleType devBundleType); static DevBundle[] parseDevBundleLines(InputStream is); static DevBundle parseDevBundleLine(String line); URL url(); File file(); String getName(); String getPath(); DevBundleType getDevBundleType(); @Override String toString(); }
DevBundle implements Serializable { public static DevBundle[] parseDevBundleLines(InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { List<DevBundle> bundles = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { bundles.add(parseDevBundleLine(line)); } } return bundles.toArray(new DevBundle[bundles.size()]); } } DevBundle(String path, DevBundleType devBundleType); static DevBundle[] parseDevBundleLines(InputStream is); static DevBundle parseDevBundleLine(String line); URL url(); File file(); String getName(); String getPath(); DevBundleType getDevBundleType(); @Override String toString();  }