程序包 spring.turbo.io

类 ClassPathResourceUtils

java.lang.Object
spring.turbo.io.ClassPathResourceUtils

public final class ClassPathResourceUtils extends Object
ClassPathResource 相关工具
从以下版本开始:
2.0.13
作者:
应卓
另请参阅:
  • 方法详细资料

    • readText

      public static String readText(String location)
      读取为文本
      参数:
      location - 资源地址 如: "META-INF/spring.txt"
      返回:
      文本
    • readText

      public static String readText(String location, @Nullable Charset charset)
      读取为文本
      参数:
      location - 资源地址 如: "META-INF/spring.txt"
      charset - 字符集
      返回:
      文本
    • readTextAsOneLine

      public static String readTextAsOneLine(String location)
      读取为单行文本
      参数:
      location - 资源地址 如: "META-INF/spring.txt"
      返回:
      当行文本
    • readTextAsOneLine

      public static String readTextAsOneLine(String location, @Nullable Charset charset)
      读取为单行文本
      参数:
      location - 资源地址 如: "META-INF/spring.txt"
      charset - 字符集
      返回:
      当行文本
    • readByteArray

      public static byte[] readByteArray(String location)
      读取为二进制数据
      参数:
      location - 资源地址 如: "META-INF/spring.data"
      返回:
      二进制数据