Package org.cef.network
Class CefResponse
- java.lang.Object
-
- org.cef.network.CefResponse
-
public abstract class CefResponse extends java.lang.ObjectClass used to represent a web response. The methods of this class may be called on any thread.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CefResponsecreate()Create a new CefRequest object.abstract voiddispose()Removes the native reference from an unused object.protected voidfinalize()abstract CefLoadHandler.ErrorCodegetError()Get the response error code.abstract java.lang.StringgetHeaderByName(java.lang.String name)Get the value for the specified response header field.abstract voidgetHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)Get all response header fields.abstract java.lang.StringgetMimeType()Get the response mime type.abstract intgetStatus()Get the response status code.abstract java.lang.StringgetStatusText()Get the response status text.abstract booleanisReadOnly()Returns true if this object is read-only.abstract voidsetError(CefLoadHandler.ErrorCode errorCode)Get the response error code.abstract voidsetHeaderByName(java.lang.String name, java.lang.String value, boolean overwrite)Set the value for the specified response header field.abstract voidsetHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)Set all response header fields.abstract voidsetMimeType(java.lang.String mimeType)Set the response mime type.abstract voidsetStatus(int status)Set the response status code.abstract voidsetStatusText(java.lang.String statusText)Set the response status text.java.lang.StringtoString()
-
-
-
Method Detail
-
finalize
protected void finalize() throws java.lang.Throwable- Throws:
java.lang.Throwable
-
create
public static final CefResponse create()
Create a new CefRequest object.
-
dispose
public abstract void dispose()
Removes the native reference from an unused object.
-
isReadOnly
public abstract boolean isReadOnly()
Returns true if this object is read-only.
-
getError
public abstract CefLoadHandler.ErrorCode getError()
Get the response error code. Returns ERR_NONE if there was no error.
-
setError
public abstract void setError(CefLoadHandler.ErrorCode errorCode)
Get the response error code. Returns ERR_NONE if there was no error.
-
getStatus
public abstract int getStatus()
Get the response status code.
-
setStatus
public abstract void setStatus(int status)
Set the response status code.
-
getStatusText
public abstract java.lang.String getStatusText()
Get the response status text.
-
setStatusText
public abstract void setStatusText(java.lang.String statusText)
Set the response status text.
-
getMimeType
public abstract java.lang.String getMimeType()
Get the response mime type.
-
setMimeType
public abstract void setMimeType(java.lang.String mimeType)
Set the response mime type.
-
getHeaderByName
public abstract java.lang.String getHeaderByName(java.lang.String name)
Get the value for the specified response header field. Use getHeaderMap instead if there might be multiple values.- Parameters:
name- The header name.- Returns:
- The header value.
-
setHeaderByName
public abstract void setHeaderByName(java.lang.String name, java.lang.String value, boolean overwrite)Set the value for the specified response header field.- Parameters:
name- The header name.value- The header value.overwrite- If true any existing values will be replaced with the new value. If false any existing values will not be overwritten.
-
getHeaderMap
public abstract void getHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Get all response header fields.
-
setHeaderMap
public abstract void setHeaderMap(java.util.Map<java.lang.String,java.lang.String> headerMap)
Set all response header fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-