private static void readPathsFromFile(String fileName, Collection<String> paths) throws IOException { BufferedReader bfr = null; try { FileReader fr = new FileReader(fileName); bfr = new BufferedReader(fr); String line; while (null != (line = bfr.readLine())) { paths.add(fixPath(line)); } } finally { if (bfr != null) { bfr.close(); } } }
private static void readPathsFromFile(String fileName, Collection<String> paths) throws IOException { BufferedReader bfr = null; try { FileReader fr = new FileReader(fileName); bfr = new BufferedReader(fr); String line; while (null != (line = bfr.readLine())) { paths.add(fixPath(line)); } } finally { if (bfr != null) { bfr.close(); } } }
private static void readPathsFromFile(String fileName, Collection<String> paths) throws IOException { BufferedReader bfr = null; try { FileReader fr = new FileReader(fileName); bfr = new BufferedReader(fr); String line; while (null != (line = bfr.readLine())) { paths.add(fixPath(line)); } } finally { if (bfr != null) { bfr.close(); } } }
private static Set<String> readPathsFromFile(String fileName) throws IOException { Set<String> paths = new HashSet<String>(); BufferedReader bfr = null; try { FileReader fr = new FileReader(fileName); bfr = new BufferedReader(fr); String line; while (null != (line = bfr.readLine())) { paths.add(fixPath(line)); } } finally { if (bfr != null) { bfr.close(); } } return paths; }
/** * Processes one file, which may be either a class or a resource. * * @param name {@code non-null;} name of the file * @param bytes {@code non-null;} contents of the file * @return whether processing was successful */ private static boolean processFileBytes(String name, byte[] bytes) { boolean isClass = name.endsWith(".class"); boolean keepResources = (outputResources != null); if (!isClass && !keepResources) { if (args.verbose) { DxConsole.out.println("ignored resource " + name); } return false; } if (args.verbose) { DxConsole.out.println("processing " + name + "..."); } String fixedName = fixPath(name); if (isClass) { if (keepResources && args.keepClassesInJar) { outputResources.put(fixedName, bytes); } return processClass(fixedName, bytes); } else { outputResources.put(fixedName, bytes); return true; } }
String fixedName = fixPath(name);
String fixedName = fixPath(name);
String fixedName = fixPath(name);
String fixedName = fixPath(name);
String fixedName = fixPath(name);