Class URIResponse
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.webprocessextension.URIResponse
- All Implemented Interfaces:
Proxy
Represents an URI response.
A WebKitURIResponse contains information such as the URI, the
status code, the content length, the mime type, the HTTP status or
the suggested filename.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classURIResponse.Builder<B extends URIResponse.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new URIResponse.URIResponse(MemorySegment address) Create a URIResponse proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected URIResponseasParent()Returns this instance as if it were its parent type.static URIResponse.Builder<? extends URIResponse.Builder> builder()AURIResponse.Builderobject constructs aURIResponsewith the specified properties.longGet the expected content length of theWebKitURIResponse.Get the HTTP headers of aWebKitURIResponseas aSoupMessageHeaders.Gets the MIME type of the response.intGet the status code of theWebKitURIResponse.Get the suggested filename forresponse.static @Nullable TypegetType()Get the GType of the URIResponse classgetUri()Gets the URI which resulted in the response.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
URIResponse
Create a URIResponse proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
URIResponse
public URIResponse()Creates a new URIResponse.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getContentLength
public long getContentLength()Get the expected content length of theWebKitURIResponse.It can be 0 if the server provided an incorrect or missing Content-Length.
- Returns:
- the expected content length of
response.
-
getHttpHeaders
Get the HTTP headers of aWebKitURIResponseas aSoupMessageHeaders.- Returns:
- a
SoupMessageHeaderswith the HTTP headers of this URIResponse ornullif this URIResponse is not an HTTP response. - Since:
- 2.6
-
getMimeType
-
getStatusCode
public int getStatusCode()Get the status code of theWebKitURIResponse.Get the status code of the
WebKitURIResponseas returned by the server. It will normally be aSoupKnownStatusCode, for exampleStatus.OK, though the server can respond with any unsigned integer.- Returns:
- the status code of this URIResponse
-
getSuggestedFilename
Get the suggested filename forresponse.Get the suggested filename for
response,as specified by the 'Content-Disposition' HTTP header, ornullif it's not present.- Returns:
- the suggested filename or
nullif the 'Content-Disposition' HTTP header is not present.
-
getUri
Gets the URI which resulted in the response.- Returns:
- response URI, as a string.
-
builder
AURIResponse.Builderobject constructs aURIResponsewith the specified properties. Use the variousset...()methods to set properties, and finish construction withURIResponse.Builder.build().- Returns:
- the builder object
-