ReplaceableString.java
1.64 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.agl.text;
import com.adobe.agl.impl.Utility;
import com.adobe.agl.text.Replaceable;
import com.adobe.agl.text.UTF16;
public class ReplaceableString
implements Replaceable {
private StringBuffer buf;
public ReplaceableString(String str) {
this.buf = new StringBuffer(str);
}
public ReplaceableString(StringBuffer buf) {
this.buf = buf;
}
public ReplaceableString() {
this.buf = new StringBuffer();
}
public String toString() {
return this.buf.toString();
}
public int length() {
return this.buf.length();
}
public char charAt(int offset) {
return this.buf.charAt(offset);
}
public int char32At(int offset) {
return UTF16.charAt(this.buf, offset);
}
public void getChars(int srcStart, int srcLimit, char[] dst, int dstStart) {
Utility.getChars(this.buf, srcStart, srcLimit, dst, dstStart);
}
public void replace(int start, int limit, String text) {
this.buf.replace(start, limit, text);
}
public void replace(int start, int limit, char[] chars, int charsStart, int charsLen) {
this.buf.delete(start, limit);
this.buf.insert(start, chars, charsStart, charsLen);
}
public void copy(int start, int limit, int dest) {
if (start == limit && start >= 0 && start <= this.buf.length()) {
return;
}
char[] text = new char[limit - start];
this.getChars(start, limit, text, 0);
this.replace(dest, dest, text, 0, limit - start);
}
public boolean hasMetaData() {
return false;
}
}