CachedOutput.java

net.minecraft.data.CachedOutput

信息

  • 全限定名:net.minecraft.data.CachedOutput
  • 类型:public interface
  • 包:net.minecraft.data
  • 源码路径:src/main/java/net/minecraft/data/CachedOutput.java
  • 起始行号:L9
  • 职责:

    TODO

字段/常量

  • NO_CACHE
    • 类型: CachedOutput
    • 修饰符: package-private
    • 源码定位: L10
    • 说明:

      TODO

内部类/嵌套类型

构造器

方法

下面的方法块按源码顺序生成。

void writeIfNeeded(Path path, byte[] input, HashCode hash) @ L15

  • 方法名:writeIfNeeded
  • 源码定位:L15
  • 返回类型:void
  • 修饰符:package-private

参数:

  • path: Path
  • input: byte[]
  • hash: HashCode

说明:

TODO

代码

public interface CachedOutput {
    CachedOutput NO_CACHE = (path, input, hash) -> {
        FileUtil.createDirectoriesSafe(path.getParent());
        Files.write(path, input);
    };
 
    void writeIfNeeded(Path path, byte[] input, HashCode hash) throws IOException;
}

引用的其他类

  • FileUtil
    • 引用位置: 方法调用
    • 关联成员: FileUtil.createDirectoriesSafe()