Class StorageUtils


  • public class StorageUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String calcSha1Digest​(java.io.File source)
      Calculates SHA1 hex digest of the given file.
      static void streamFileToWebSocket​(java.io.File source, org.openqa.selenium.remote.http.WebSocket socket)
      Feeds the content of the given file to the provided web socket.
      • Methods inherited from class java.lang.Object

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

      • calcSha1Digest

        public static java.lang.String calcSha1Digest​(java.io.File source)
        Calculates SHA1 hex digest of the given file.
        Parameters:
        source - The file instance to calculate the hash for.
        Returns:
        Hash digest represented as a string of hexadecimal numbers.
      • streamFileToWebSocket

        public static void streamFileToWebSocket​(java.io.File source,
                                                 org.openqa.selenium.remote.http.WebSocket socket)
        Feeds the content of the given file to the provided web socket.
        Parameters:
        source - The source file instance.
        socket - The destination web socket.