Class Utils

java.lang.Object
com.microsoft.playwright.impl.Utils

class Utils extends Object
  • Field Details

  • Constructor Details

    • Utils

      Utils()
  • Method Details

    • convertType

      static <F, T> T convertType(F f, Class<T> t)
    • clone

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

      static String globToRegex(String glob)
    • mimeType

      static String mimeType(Path path)
    • hasLargeFile

      static boolean hasLargeFile(Path[] files)
    • addLargeFileUploadParams

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

      static void checkFilePayloadSize(FilePayload[] files)
    • toFilePayloads

      static FilePayload[] toFilePayloads(Path[] files)
    • toFilePayload

      static FilePayload toFilePayload(Path file)
    • mkParentDirs

      static void mkParentDirs(Path file)
    • writeToFile

      static void writeToFile(byte[] buffer, Path path)
    • writeToFile

      static void writeToFile(InputStream inputStream, Path path)
    • isSafeCloseError

      static boolean isSafeCloseError(PlaywrightException exception)
    • isSafeCloseError

      static boolean isSafeCloseError(String error)
    • createGuid

      static String createGuid()
    • toHeadersMap

      static Map<String,String> toHeadersMap(List<HttpHeader> headers)
    • toHeadersList

      static List<HttpHeader> toHeadersList(Map<String,String> headers)
    • toJsRegexFlags

      static String toJsRegexFlags(Pattern pattern)
    • fromJsRegexFlags

      static int fromJsRegexFlags(String regexFlags)