@Test public void shouldNotNeedToHash254ASCIIChars() { final String extension = ".zip"; char[] chars = new char[254 - extension.length()]; Arrays.fill(chars, 'B'); String filename = new String(chars); File original = new File("dir", filename); String newName = TandemPath.join(original.toString(), extension); final String aNewName = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" + "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" + "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" + "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" + "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.zip"; File expected = new File("dir", aNewName); assertEquals("254 ASCII characters", expected.toString(), newName); }
public static String join(String filePath, String asciiExtension) { File file = new File(filePath); String newName = TandemFilename.join(file.getName(), asciiExtension); File newFile = new File(file.getParent(), newName); return newFile.getPath(); }
TandemPath { public static String join(String filePath, String asciiExtension) { File file = new File(filePath); String newName = TandemFilename.join(file.getName(), asciiExtension); File newFile = new File(file.getParent(), newName); return newFile.getPath(); } }
TandemPath { public static String join(String filePath, String asciiExtension) { File file = new File(filePath); String newName = TandemFilename.join(file.getName(), asciiExtension); File newFile = new File(file.getParent(), newName); return newFile.getPath(); } private  TandemPath(); }
TandemPath { public static String join(String filePath, String asciiExtension) { File file = new File(filePath); String newName = TandemFilename.join(file.getName(), asciiExtension); File newFile = new File(file.getParent(), newName); return newFile.getPath(); } private  TandemPath(); static String join(String filePath, String asciiExtension); }
TandemPath { public static String join(String filePath, String asciiExtension) { File file = new File(filePath); String newName = TandemFilename.join(file.getName(), asciiExtension); File newFile = new File(file.getParent(), newName); return newFile.getPath(); } private  TandemPath(); static String join(String filePath, String asciiExtension);  }