Interface FileContentRenderer

  • All Known Implementing Classes:
    FileRenderer

    public interface FileContentRenderer
    • Method Summary

      Modifier and Type Method Description
      default boolean canRender​(java.nio.file.Path p)  
      default java.nio.ByteBuffer getByteBuffer​(java.nio.file.Path sourcePath)  
      default java.nio.channels.SeekableByteChannel getByteChannel​(java.nio.file.Path targetPath)  
      default java.io.InputStream getInputStream​(java.nio.file.Path targetName)  
      default java.nio.ByteBuffer getRendered​(java.nio.file.Path targetPath)  
      java.nio.file.Path getRenderedTargetName​(java.nio.file.Path sourceName)  
      java.nio.file.Path getSourcePath​(java.nio.file.Path targetName)
      Return the matching source path, but only if the target name matches the target extension.
      java.util.regex.Pattern getSourcePattern()  
      java.util.regex.Pattern getTargetPattern()  
      java.lang.String getTargetSuffix()  
      default boolean hasSource​(java.nio.file.Path p)  
      default boolean matchesSource​(java.nio.file.Path p)  
      default boolean matchesTarget​(java.nio.file.Path p)  
      java.nio.ByteBuffer render​(java.nio.file.Path source, java.nio.file.Path target, java.nio.ByteBuffer input)  
    • Method Detail

      • getSourcePattern

        java.util.regex.Pattern getSourcePattern()
        Returns:
        a pattern that can be used to match path names which serve as the source data of rendered files.
      • getTargetPattern

        java.util.regex.Pattern getTargetPattern()
        Returns:
        a pattern that can be used to match path names which are to be dynamically rendered from source file content.
      • matchesSource

        default boolean matchesSource​(java.nio.file.Path p)
      • matchesTarget

        default boolean matchesTarget​(java.nio.file.Path p)
      • hasSource

        default boolean hasSource​(java.nio.file.Path p)
      • canRender

        default boolean canRender​(java.nio.file.Path p)
      • getTargetSuffix

        java.lang.String getTargetSuffix()
      • getSourcePath

        java.nio.file.Path getSourcePath​(java.nio.file.Path targetName)
        Return the matching source path, but only if the target name matches the target extension.
        Parameters:
        targetName - The target Path which represents the intended to be rendered
        Returns:
        A source path, or null if the target name does not match for this renderer
      • getRenderedTargetName

        java.nio.file.Path getRenderedTargetName​(java.nio.file.Path sourceName)
      • getInputStream

        default java.io.InputStream getInputStream​(java.nio.file.Path targetName)
      • render

        java.nio.ByteBuffer render​(java.nio.file.Path source,
                                   java.nio.file.Path target,
                                   java.nio.ByteBuffer input)
      • getRendered

        default java.nio.ByteBuffer getRendered​(java.nio.file.Path targetPath)
      • getByteChannel

        default java.nio.channels.SeekableByteChannel getByteChannel​(java.nio.file.Path targetPath)
      • getByteBuffer

        default java.nio.ByteBuffer getByteBuffer​(java.nio.file.Path sourcePath)
                                           throws java.io.IOException
        Throws:
        java.io.IOException