类 ConcurrentDiskUtil
java.lang.Object
com.alibaba.nacos.client.utils.ConcurrentDiskUtil
Concurrent Disk util.
- 作者:
- nkorange
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringbyteBufferToString(ByteBuffer buffer, String charsetName) transfer ByteBuffer to String.static StringgetFileContent(File file, String charsetName) get file content.static StringgetFileContent(String path, String charsetName) get file content.static BooleanwriteFileContent(File file, String content, String charsetName) write file content.static BooleanwriteFileContent(String path, String content, String charsetName) write file content.
-
构造器详细资料
-
ConcurrentDiskUtil
public ConcurrentDiskUtil()
-
-
方法详细资料
-
getFileContent
get file content.- 参数:
path- file pathcharsetName- charsetName- 返回:
- content
- 抛出:
IOException- IOException
-
getFileContent
get file content.- 参数:
file- filecharsetName- charsetName- 返回:
- content
- 抛出:
IOException- IOException
-
writeFileContent
public static Boolean writeFileContent(String path, String content, String charsetName) throws IOException write file content.- 参数:
path- file pathcontent- contentcharsetName- charsetName- 返回:
- whether write ok
- 抛出:
IOException- IOException
-
writeFileContent
public static Boolean writeFileContent(File file, String content, String charsetName) throws IOException write file content.- 参数:
file- filecontent- contentcharsetName- charsetName- 返回:
- whether write ok
- 抛出:
IOException- IOException
-
byteBufferToString
transfer ByteBuffer to String.- 参数:
buffer- buffercharsetName- charsetName- 返回:
- String
- 抛出:
IOException- IOException
-