@Test public void testGetDumpFile1() { String url = "http: String fileName = this.dumper.getDumpFile(url).getName(); assertTrue(this.now.compareTo(fileName) < 0); assertEquals("_weather_q_test.txt", fileName.substring(20)); }
File getDumpFile(String url) { StringBuilder fileName = new StringBuilder(); fileName.append(DATE_FORMAT.format(new Date())); fileName.append(url.replace(this.prefix, "")); for (int i = 0; i < fileName.length(); i++) { if (BAD_CHARS.contains(fileName.charAt(i))) { fileName.setCharAt(i, REPLACEMENT); } } fileName.append(".txt"); return new File(this.path, fileName.toString()); }
DebugDumper { File getDumpFile(String url) { StringBuilder fileName = new StringBuilder(); fileName.append(DATE_FORMAT.format(new Date())); fileName.append(url.replace(this.prefix, "")); for (int i = 0; i < fileName.length(); i++) { if (BAD_CHARS.contains(fileName.charAt(i))) { fileName.setCharAt(i, REPLACEMENT); } } fileName.append(".txt"); return new File(this.path, fileName.toString()); } }
DebugDumper { File getDumpFile(String url) { StringBuilder fileName = new StringBuilder(); fileName.append(DATE_FORMAT.format(new Date())); fileName.append(url.replace(this.prefix, "")); for (int i = 0; i < fileName.length(); i++) { if (BAD_CHARS.contains(fileName.charAt(i))) { fileName.setCharAt(i, REPLACEMENT); } } fileName.append(".txt"); return new File(this.path, fileName.toString()); } DebugDumper(Context context, String prefix); }
DebugDumper { File getDumpFile(String url) { StringBuilder fileName = new StringBuilder(); fileName.append(DATE_FORMAT.format(new Date())); fileName.append(url.replace(this.prefix, "")); for (int i = 0; i < fileName.length(); i++) { if (BAD_CHARS.contains(fileName.charAt(i))) { fileName.setCharAt(i, REPLACEMENT); } } fileName.append(".txt"); return new File(this.path, fileName.toString()); } DebugDumper(Context context, String prefix); void dump(String url, String content); }
DebugDumper { File getDumpFile(String url) { StringBuilder fileName = new StringBuilder(); fileName.append(DATE_FORMAT.format(new Date())); fileName.append(url.replace(this.prefix, "")); for (int i = 0; i < fileName.length(); i++) { if (BAD_CHARS.contains(fileName.charAt(i))) { fileName.setCharAt(i, REPLACEMENT); } } fileName.append(".txt"); return new File(this.path, fileName.toString()); } DebugDumper(Context context, String prefix); void dump(String url, String content);  }