MCPcopy
hub / github.com/vipshop/vjtools / append

Method append

vjkit/src/main/java/com/vip/vjtools/vjkit/io/FileUtil.java:96–104  ·  view source on GitHub ↗

追加String到File.

(final CharSequence data, final File file)

Source from the content-addressed store, hash-verified

94 * 追加String到File.
95 */
96 public static void append(final CharSequence data, final File file) throws IOException {
97 Validate.notNull(file);
98 Validate.notNull(data);
99
100 try (BufferedWriter writer = Files.newBufferedWriter(file.toPath(), Charsets.UTF_8,
101 StandardOpenOption.APPEND)) {
102 writer.append(data);
103 }
104 }
105
106 /**
107 * 打开文件为InputStream.

Callers 15

readWriteMethod · 0.95
initDescriptionMethod · 0.45
concatenateMethod · 0.45
printSingleThreadMethod · 0.45
printAllThreadsMethod · 0.45
toStringMethod · 0.45
joinMethod · 0.45
makeGarbageMethod · 0.45
doBeansMethod · 0.45
doSubCommandMethod · 0.45
recurseTabularDataMethod · 0.45
recurseCompositeDataMethod · 0.45

Calls

no outgoing calls

Tested by 2

readWriteMethod · 0.76
makeGarbageMethod · 0.36