com.google.appengine.api.images.dev

## Class LocalBlobImageServlet.ParsedUrl

- java.lang.Object
- - com.google.appengine.api.images.dev.LocalBlobImageServlet.ParsedUrl

- Enclosing class:
    LocalBlobImageServlet

      protected static class LocalBlobImageServlet.ParsedUrl
      extends java.lang.Object

  Utility class to parse a Local URL into its component parts. The Local url format is as follows: /_ah/img/SomeValidBlobKey[=options] where options is either "sX" where X is from ParsedUrl.uncroppedSizes or "sX-c" where X is from ParsedUrl.croppedSizes.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static LocalBlobImageServlet.ParsedUrl` | `createParsedUrl(java.lang.String requestUri)` Creates a `ParsedUrl` instance from the given URL.
    `java.lang.String` | `getBlobKey()` Returns the parsed BlobKey.
    `boolean` | `getCrop()` Returns the crop option.
    `int` | `getResize()` Returns the resize option.
    `boolean` | `hasOptions()` Checks if the parsed url has options.
    `protected void` | `parse(java.lang.String requestUri)` Parses a Local URL to its component parts.
    `protected void` | `parseOptions()` Parses URL options to its component parts.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### hasOptions

          public boolean hasOptions()

      Checks if the parsed url has options.

    - #### getBlobKey

          public java.lang.String getBlobKey()

      Returns the parsed BlobKey.

    - #### getResize

          public int getResize()

      Returns the resize option. Only valid if hasOption() is `true`.

    - #### getCrop

          public boolean getCrop()

      Returns the crop option. Only valid if hasOption() is `true`.

    - #### createParsedUrl

          protected static LocalBlobImageServlet.ParsedUrl createParsedUrl(java.lang.String requestUri)

      Creates a `ParsedUrl` instance from the given URL.
      Parameters:
        `requestUri` - the requested URL
      Returns:
        an instance

    - #### parse

          protected void parse(java.lang.String requestUri)

      Parses a Local URL to its component parts.
      Parameters:
        `requestUri` - the Local request URL
      Throws:
        `java.lang.IllegalArgumentException` - for malformed URLs

    - #### parseOptions

          protected void parseOptions()

      Parses URL options to its component parts.
      Throws:
        `java.lang.IllegalArgumentException` - for malformed options