Class PathRoot

java.lang.Object
space.arim.dazzleconf.backend.PathRoot
All Implemented Interfaces:
BinaryRoot, DataRoot, ReadableRoot

public final class PathRoot extends Object implements ReadableRoot, BinaryRoot
A data root from a file path.

Both textual and binary operations can be performed on this data root. If textual operations are used, then the charset specified at construction will be used to provide encoding.

  • Constructor Details

    • PathRoot

      public PathRoot(@NonNull Path path, @NonNull Charset charset)
      Creates from a path and a charset.

      The charset will be used for operations which read or write textual data.

      Parameters:
      path - the path
      charset - the charset
    • PathRoot

      public PathRoot(@NonNull Path path)
      Creates from a path.

      UTF-8 charset will be used for operations which read or write textual data.

      Parameters:
      path - the path
  • Method Details