类 ConcurrentDiskUtil

java.lang.Object
com.alibaba.nacos.client.utils.ConcurrentDiskUtil

public class ConcurrentDiskUtil extends Object
Concurrent Disk util.
作者:
nkorange
  • 构造器详细资料

    • ConcurrentDiskUtil

      public ConcurrentDiskUtil()
  • 方法详细资料

    • getFileContent

      public static String getFileContent(String path, String charsetName) throws IOException
      get file content.
      参数:
      path - file path
      charsetName - charsetName
      返回:
      content
      抛出:
      IOException - IOException
    • getFileContent

      public static String getFileContent(File file, String charsetName) throws IOException
      get file content.
      参数:
      file - file
      charsetName - charsetName
      返回:
      content
      抛出:
      IOException - IOException
    • writeFileContent

      public static Boolean writeFileContent(String path, String content, String charsetName) throws IOException
      write file content.
      参数:
      path - file path
      content - content
      charsetName - charsetName
      返回:
      whether write ok
      抛出:
      IOException - IOException
    • writeFileContent

      public static Boolean writeFileContent(File file, String content, String charsetName) throws IOException
      write file content.
      参数:
      file - file
      content - content
      charsetName - charsetName
      返回:
      whether write ok
      抛出:
      IOException - IOException
    • byteBufferToString

      public static String byteBufferToString(ByteBuffer buffer, String charsetName) throws IOException
      transfer ByteBuffer to String.
      参数:
      buffer - buffer
      charsetName - charsetName
      返回:
      String
      抛出:
      IOException - IOException