Class Utils


  • class Utils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.util.Set<java.lang.Character> escapeGlobChars  
      (package private) static long maxUploadBufferSize  
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void addLargeFileUploadParams​(java.nio.file.Path[] files, com.google.gson.JsonObject params, BrowserContextImpl context)  
      (package private) static void checkFilePayloadSize​(FilePayload[] files)  
      (package private) static <T> T clone​(T f)  
      (package private) static <F,​T>
      T
      convertType​(F f, java.lang.Class<T> t)  
      (package private) static java.lang.String createGuid()  
      (package private) static int fromJsRegexFlags​(java.lang.String regexFlags)  
      (package private) static java.lang.String globToRegex​(java.lang.String glob)  
      (package private) static boolean hasLargeFile​(java.nio.file.Path[] files)  
      (package private) static boolean isSafeCloseError​(PlaywrightException exception)  
      (package private) static boolean isSafeCloseError​(java.lang.String error)  
      (package private) static java.lang.String mimeType​(java.nio.file.Path path)  
      (package private) static void mkParentDirs​(java.nio.file.Path file)  
      (package private) static FilePayload toFilePayload​(java.nio.file.Path file)  
      (package private) static FilePayload[] toFilePayloads​(java.nio.file.Path[] files)  
      (package private) static java.util.List<HttpHeader> toHeadersList​(java.util.Map<java.lang.String,​java.lang.String> headers)  
      (package private) static java.util.Map<java.lang.String,​java.lang.String> toHeadersMap​(java.util.List<HttpHeader> headers)  
      (package private) static java.lang.String toJsRegexFlags​(java.util.regex.Pattern pattern)  
      (package private) static void writeToFile​(byte[] buffer, java.nio.file.Path path)  
      (package private) static void writeToFile​(java.io.InputStream inputStream, java.nio.file.Path path)  
      • Methods inherited from class java.lang.Object

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

      • escapeGlobChars

        static java.util.Set<java.lang.Character> escapeGlobChars
    • Constructor Detail

      • Utils

        Utils()
    • Method Detail

      • convertType

        static <F,​T> T convertType​(F f,
                                         java.lang.Class<T> t)
      • clone

        static <T> T clone​(T f)
      • globToRegex

        static java.lang.String globToRegex​(java.lang.String glob)
      • mimeType

        static java.lang.String mimeType​(java.nio.file.Path path)
      • hasLargeFile

        static boolean hasLargeFile​(java.nio.file.Path[] files)
      • addLargeFileUploadParams

        static void addLargeFileUploadParams​(java.nio.file.Path[] files,
                                             com.google.gson.JsonObject params,
                                             BrowserContextImpl context)
      • checkFilePayloadSize

        static void checkFilePayloadSize​(FilePayload[] files)
      • toFilePayloads

        static FilePayload[] toFilePayloads​(java.nio.file.Path[] files)
      • toFilePayload

        static FilePayload toFilePayload​(java.nio.file.Path file)
      • mkParentDirs

        static void mkParentDirs​(java.nio.file.Path file)
      • writeToFile

        static void writeToFile​(byte[] buffer,
                                java.nio.file.Path path)
      • writeToFile

        static void writeToFile​(java.io.InputStream inputStream,
                                java.nio.file.Path path)
      • isSafeCloseError

        static boolean isSafeCloseError​(java.lang.String error)
      • createGuid

        static java.lang.String createGuid()
      • toHeadersMap

        static java.util.Map<java.lang.String,​java.lang.String> toHeadersMap​(java.util.List<HttpHeader> headers)
      • toHeadersList

        static java.util.List<HttpHeader> toHeadersList​(java.util.Map<java.lang.String,​java.lang.String> headers)
      • toJsRegexFlags

        static java.lang.String toJsRegexFlags​(java.util.regex.Pattern pattern)
      • fromJsRegexFlags

        static int fromJsRegexFlags​(java.lang.String regexFlags)