Interface AIInOut

    • Method Detail

      • write

        void write​(String content)
        Writes a string to the output.
        Parameters:
        content - the string to write
      • getFile

        File getFile()
        The underlying file.
      • sameFile

        default boolean sameFile​(AIInOut other)
      • exists

        default boolean exists()
      • of

        @Nullable
        static AIInOut of​(@Nullable
                          File file)
        Creates an AIInOut instance that reads from a file.
        Parameters:
        file - the file to read from
        Returns:
        an AIInOut instance
      • of

        @Nullable
        static AIInOut of​(@Nullable
                          Path path)
        Creates an AIInOut instance that reads from a file.
        Parameters:
        path - the path to the file to read from
        Returns:
        an AIInOut instance
      • of

        @Nonnull
        static AIInOut of​(@Nonnull
                          SegmentedFile segmentedFile,
                          int segmentIndex)
        Creates an AIInOut instance that reads from a segment of a segmented file.
        Parameters:
        segmentedFile - the segmented file to read from
        segmentIndex - the index of the segment to read
        Returns:
        an AIInOut instance
      • of

        static AIInOut of​(InputStream in)
        Creates an AIInOut instance that reads from an input stream. Writing is not supported.
        Parameters:
        in - the input stream to read from
        Returns:
        an AIInOut instance