Class ResourceUtil

java.lang.Object
com.github.toolarium.jwebserver.util.ResourceUtil

public final class ResourceUtil extends Object
Resource utility.
  • Method Details

    • getInstance

      public static ResourceUtil getInstance()
      Get the instance
      Returns:
      the instance
    • slashify

      public String slashify(String base)
      Slashify
      Parameters:
      base - the path
      Returns:
      the slashified string
    • canonicalize

      public String canonicalize(String s)
      Canonicalize
      Parameters:
      s - the string to canonicalize
      Returns:
      the canonicalized string
    • prepareString

      public String prepareString(String[] input, int size)
      Prepare string
      Parameters:
      input - the input
      size - the size of the string
      Returns:
      the prepared string
    • toString

      public String toString(io.undertow.server.handlers.resource.Resource resource)
      Convert a resource into a string
      Parameters:
      resource - the resource
      Returns:
      the string