Interface BinaryRoot

All Superinterfaces:
DataRoot
All Known Implementing Classes:
InputOutputRoot, PathRoot

public interface BinaryRoot extends DataRoot
Data roots which are capable of working with raw bytes.
  • Method Details

    • openReadChannel

      <R> R openReadChannel(@NonNull DataRoot.Operation<R,@NonNull ReadableByteChannel> operation) throws IOException
      Opens a read channel for the data
      Type Parameters:
      R - the result type
      Parameters:
      operation - the operation
      Returns:
      the operation result
      Throws:
      IOException - upon failure to open
    • openInputStream

      <R> R openInputStream(@NonNull DataRoot.Operation<R,@NonNull InputStream> operation) throws IOException
      Opens an input stream for the data
      Type Parameters:
      R - the result type
      Parameters:
      operation - the operation
      Returns:
      the operation result
      Throws:
      IOException - upon failure to open
    • openWriteChannel

      <R> R openWriteChannel(@NonNull DataRoot.Operation<R,@NonNull WritableByteChannel> operation) throws IOException
      Opens a write channel to the data
      Type Parameters:
      R - the result type
      Parameters:
      operation - the operation
      Returns:
      the operation result
      Throws:
      IOException - upon failure to open
    • openOutputStream

      <R> R openOutputStream(@NonNull DataRoot.Operation<R,@NonNull OutputStream> operation) throws IOException
      Opens an output stream to the data
      Type Parameters:
      R - the result type
      Parameters:
      operation - the operation
      Returns:
      the operation result
      Throws:
      IOException - upon failure to open