MCPcopy Create free account
hub / github.com/0opslab/opslabJutil / write

Method write

src/main/java/com/opslab/helper/FileHelper.java:267–278  ·  view source on GitHub ↗

写文件 @param file 需要处理的函数 @param str 添加的子字符串 @return 是否成功

(File file, String str)

Source from the content-addressed store, hash-verified

265 * @return 是否成功
266 */
267 public static boolean write(File file, String str) {
268 AssertUtil.notNull(file, "file is null");
269 try (
270 RandomAccessFile randomFile = new RandomAccessFile(file, "rw")
271 ) {
272 randomFile.writeBytes(str);
273 return true;
274 } catch (IOException e) {
275 e.printStackTrace();
276 }
277 return false;
278 }
279
280 /**
281 * 写文件

Callers 9

encodeBytesMethod · 0.45
addWriteMethod · 0.45
copyFileMethod · 0.45
cleanFileMethod · 0.45
sourceFileMethod · 0.45
encodeBytesMethod · 0.45
decodeMethod · 0.45
sendPostMethod · 0.45
sendPostSSLMethod · 0.45

Calls 1

notNullMethod · 0.95

Tested by

no test coverage detected