public class ConcurrentDiskUtil extends Object
| 构造器和说明 |
|---|
ConcurrentDiskUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
byteBufferToString(ByteBuffer buffer,
String charsetName)
transfer ByteBuffer to String.
|
static String |
getFileContent(File file,
String charsetName)
get file content.
|
static String |
getFileContent(String path,
String charsetName)
get file content.
|
static Boolean |
writeFileContent(File file,
String content,
String charsetName)
write file content.
|
static Boolean |
writeFileContent(String path,
String content,
String charsetName)
write file content.
|
public static String getFileContent(String path, String charsetName) throws IOException
path - file pathcharsetName - charsetNameIOException - IOExceptionpublic static String getFileContent(File file, String charsetName) throws IOException
file - filecharsetName - charsetNameIOException - IOExceptionpublic static Boolean writeFileContent(String path, String content, String charsetName) throws IOException
path - file pathcontent - contentcharsetName - charsetNameIOException - IOExceptionpublic static Boolean writeFileContent(File file, String content, String charsetName) throws IOException
file - filecontent - contentcharsetName - charsetNameIOException - IOExceptionpublic static String byteBufferToString(ByteBuffer buffer, String charsetName) throws IOException
buffer - buffercharsetName - charsetNameIOException - IOExceptionCopyright © 2018–2023 Alibaba Group. All rights reserved.