File: net.py

package info (click to toggle)
python-pywebview 6.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,452 kB
  • sloc: python: 10,921; javascript: 3,250; java: 522; cs: 130; sh: 15; makefile: 3; xml: 1
file content (28 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
__all__ = ('Uri',)

from jnius import JavaClass, JavaMethod, JavaStaticMethod, MetaJavaClass


class Uri(JavaClass, metaclass=MetaJavaClass):
    """
    Represents a URI reference as defined in RFC 2396, composed of components such as
    scheme, authority, path, query, and fragment.

    The Uri class provides methods to work with uniform resource identifiers (URI). It
    facilitates parsing, retrieving specific parts of the URI, and performing a variety
    of URI-related manipulations. Typically used in Android development for handling
    URI-based resources.

    Attributes:
        __javaclass__ : str
            Specifies the associated Java class for this Python wrapper.
        parse : JavaMethod
            Represents the Java method 'parse' to convert a string to a Uri instance.
        getLastPathSegment : JavaMethod
            Represents the Java method 'getLastPathSegment' to retrieve the last
            segment of the URI's path.
    """

    __javaclass__ = 'android/net/Uri'
    parse = JavaStaticMethod('(Ljava/lang/String;)Landroid/net/Uri;')
    getLastPathSegment = JavaMethod('()Ljava/lang/String;')