Class ChecksumPath


  • public class ChecksumPath
    extends java.lang.Object
    Utility used by AssetRequestHandler implementations where the first folder in the extra path is actually a computed checksum of the resource's content.
    Since:
    5.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String checksum  
      java.lang.String resourcePath  
    • Constructor Summary

      Constructors 
      Constructor Description
      ChecksumPath​(ResourceStreamer streamer, java.lang.String baseFolder, java.lang.String extraPath)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean stream​(Resource resource)
      If the resource exists and the checksum is correct, stream it to the client and return true.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • checksum

        public final java.lang.String checksum
    • Method Detail

      • stream

        public boolean stream​(Resource resource)
                       throws java.io.IOException
        If the resource exists and the checksum is correct, stream it to the client and return true. Otherwise, return false.
        Parameters:
        resource - to stream
        Returns:
        true if streamed, false otherwise
        Throws:
        java.io.IOException