-
Notifications
You must be signed in to change notification settings - Fork 0
/
java.nio.charset.d.ts
198 lines (120 loc) · 4.02 KB
/
java.nio.charset.d.ts
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/// <reference path="java.lang.d.ts" />
/// <reference path="java.util.d.ts" />
/// <reference path="java.io.d.ts" />
/// <reference path="java.nio.d.ts" />
declare module '@afterburnerhq/java.nio.charset' {
import { CharSequence, Error, Comparable, String, Exception, IllegalArgumentException } from '@afterburnerhq/java.lang'
import { Locale, SortedMap, Set } from '@afterburnerhq/java.util'
import { IOException } from '@afterburnerhq/java.io'
import { CharBuffer, ByteBuffer } from '@afterburnerhq/java.nio'
export class CharacterCodingException extends IOException {
constructor();
}
export abstract class Charset extends Object implements Comparable<Charset> {
static isSupported(arg0: String): boolean;
static forName(arg0: String): Charset;
static availableCharsets(): SortedMap<String, Charset>;
static defaultCharset(): Charset;
name(): String;
aliases(): Set<String>;
displayName(): String;
isRegistered(): boolean;
displayName(arg0: Locale): String;
abstract contains(arg0: Charset): boolean;
abstract newDecoder(): CharsetDecoder;
abstract newEncoder(): CharsetEncoder;
canEncode(): boolean;
decode(arg0: ByteBuffer): CharBuffer;
encode(arg0: CharBuffer): ByteBuffer;
encode(arg0: String): ByteBuffer;
compareTo(arg0: Charset): number;
hashCode(): number;
equals(arg0: Object): boolean;
toString(): string;
}
export abstract class CharsetDecoder {
charset(): Charset;
replacement(): String;
replaceWith(arg0: String): CharsetDecoder;
malformedInputAction(): CodingErrorAction;
onMalformedInput(arg0: CodingErrorAction): CharsetDecoder;
unmappableCharacterAction(): CodingErrorAction;
onUnmappableCharacter(arg0: CodingErrorAction): CharsetDecoder;
averageCharsPerByte(): number;
maxCharsPerByte(): number;
decode(arg0: ByteBuffer, arg1: CharBuffer, arg2: boolean): CoderResult;
flush(arg0: CharBuffer): CoderResult;
reset(): CharsetDecoder;
decode(arg0: ByteBuffer): CharBuffer;
isAutoDetecting(): boolean;
isCharsetDetected(): boolean;
detectedCharset(): Charset;
}
export abstract class CharsetEncoder {
charset(): Charset;
replacement(): number[];
replaceWith(arg0: number[]): CharsetEncoder;
isLegalReplacement(arg0: number[]): boolean;
malformedInputAction(): CodingErrorAction;
onMalformedInput(arg0: CodingErrorAction): CharsetEncoder;
unmappableCharacterAction(): CodingErrorAction;
onUnmappableCharacter(arg0: CodingErrorAction): CharsetEncoder;
averageBytesPerChar(): number;
maxBytesPerChar(): number;
encode(arg0: CharBuffer, arg1: ByteBuffer, arg2: boolean): CoderResult;
flush(arg0: ByteBuffer): CoderResult;
reset(): CharsetEncoder;
encode(arg0: CharBuffer): ByteBuffer;
canEncode(arg0: String): boolean;
canEncode(arg0: CharSequence): boolean;
}
export class CoderMalfunctionError extends Error {
constructor(arg0: Exception);
}
export class CoderResult {
static UNDERFLOW:CoderResult
static OVERFLOW:CoderResult
toString(): string;
isUnderflow(): boolean;
isOverflow(): boolean;
isError(): boolean;
isMalformed(): boolean;
isUnmappable(): boolean;
length(): number;
static malformedForLength(arg0: number): CoderResult;
static unmappableForLength(arg0: number): CoderResult;
throwException(): void;
}
export class CodingErrorAction {
static IGNORE:CodingErrorAction
static REPLACE:CodingErrorAction
static REPORT:CodingErrorAction
toString(): string;
}
export class IllegalCharsetNameException extends IllegalArgumentException {
constructor(arg0: String);
getCharsetName(): String;
}
export class MalformedInputException extends CharacterCodingException {
constructor(arg0: number);
getInputLength(): number;
getMessage(): String;
}
export class StandardCharsets {
static US_ASCII:Charset
static ISO_8859_1:Charset
static UTF_8:Charset
static UTF_16BE:Charset
static UTF_16LE:Charset
static UTF_16:Charset
}
export class UnmappableCharacterException extends CharacterCodingException {
constructor(arg0: number);
getInputLength(): number;
getMessage(): String;
}
export class UnsupportedCharsetException extends IllegalArgumentException {
constructor(arg0: String);
getCharsetName(): String;
}
}