-
-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathCefPostData.java
More file actions
81 lines (66 loc) · 2.06 KB
/
CefPostData.java
File metadata and controls
81 lines (66 loc) · 2.06 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package org.cef.network;
import java.util.Vector;
/**
* Class used to represent post data for a web request. The methods of this
* class may be called on any thread.
*/
public abstract class CefPostData {
// This CTOR can't be called directly. Call method create() instead.
CefPostData() {}
@Override
protected void finalize() throws Throwable {
dispose();
super.finalize();
}
/**
* Create a new CefPostData object.
*/
public static final CefPostData create() {
return CefPostData_N.createNative();
}
/**
* Removes the native reference from an unused object.
*/
public abstract void dispose();
/**
* Returns true if this object is read-only.
*/
public abstract boolean isReadOnly();
/**
* Returns the number of existing post data elements.
*/
public abstract int getElementCount();
/**
* Retrieve the post data elements.
*/
public abstract void getElements(Vector<CefPostDataElement> elements);
/**
* Remove the specified post data element. Returns true if the removal
* succeeds.
*/
public abstract boolean removeElement(CefPostDataElement element);
/**
* Add the specified post data element. Returns true if the add succeeds.
*/
public abstract boolean addElement(CefPostDataElement element);
/**
* Remove all existing post data elements.
*/
public abstract void removeElements();
@Override
public String toString() {
return toString(null);
}
public String toString(String mimeType) {
Vector<CefPostDataElement> elements = new Vector<CefPostDataElement>();
getElements(elements);
String returnValue = "";
for (CefPostDataElement el : elements) {
returnValue += el.toString(mimeType) + "\n";
}
return returnValue;
}
}