List of utility methods to do File Append
StringBuffer | appendTo(StringBuffer sb, CharSequence s) append To return appendTo(sb, s, 0, s.length());
|
File[] | appendToArray(final File[] original, final File[] toAppend) append To Array Vector<File> toReturn = new Vector<File>(); for (int i = 0; i < original.length; i++) { File file = original[i]; toReturn.add(file); for (int i = 0; i < toAppend.length; i++) { File file = toAppend[i]; toReturn.add(file); ... |
Vector | appendToCollection(final Vector append To Collection Vector<File> toReturn = new Vector(original); for (int i = 0; i < toAppend.length; i++) { File file = toAppend[i]; toReturn.add(file); return toReturn; |
File | appendToFileName(File file, String str) append To File Name String properPath = file.getPath().substring(0, file.getPath().lastIndexOf(File.separator)); String fileNameWithoutExt = file.getName().substring(0, file.getName().lastIndexOf(".") == -1 ? file.getName().length() : file.getName().lastIndexOf(".")) + str.replaceAll("\\s", "_"); return new File((properPath + File.separator + fileNameWithoutExt + ".srt")); |
void | appendToken(StringBuilder path, String token, boolean skipEmpty, boolean skipSeparator) append Token if (skipEmpty && (token == null || token.length() == 0)) { if (skipSeparator) { path.replace(path.length() - 1, path.length(), ""); return; path.append(token); if (!skipSeparator) ... |
void | appendToOutput(InputStream input, OutputStream output) append To Output byte[] buffer = new byte[8192]; int bytesRead; try { while ((bytesRead = input.read(buffer)) != -1) { output.write(buffer, 0, bytesRead); } catch (IOException e) { throw new RuntimeException(e); ... |
void | appendToOutputStream(OutputStream out, String value) append To Output Stream out.write(value.getBytes("UTF-8"));
|