Lines Matching defs:cs

42 import sun.nio.cs.HistoricallyNamedCharset;
43 import sun.nio.cs.ArrayDecoder;
44 import sun.nio.cs.ArrayEncoder;
75 private static byte[] safeTrim(byte[] ba, int len, Charset cs, boolean isTrusted) {
85 Charset cs, boolean isTrusted) {
124 private final Charset cs;
128 private StringDecoder(Charset cs, String rcn) {
130 this.cs = cs;
131 this.cd = cs.newDecoder()
134 this.isTrusted = (cs.getClass().getClassLoader0() == null);
138 if (cs instanceof HistoricallyNamedCharset)
139 return ((HistoricallyNamedCharset)cs).historicalName();
140 return cs.name();
154 return safeTrim(ca, clen, cs, isTrusted);
171 return safeTrim(ca, cb.position(), cs, isTrusted);
185 Charset cs = lookupCharset(csn);
186 if (cs != null)
187 sd = new StringDecoder(cs, csn);
196 static char[] decode(Charset cs, byte[] ba, int off, int len) {
197 // (1)We never cache the "external" cs, the only benefit of creating
213 CharsetDecoder cd = cs.newDecoder();
220 if (!(isTrusted = (cs.getClass().getClassLoader0() == null))) {
230 return safeTrim(ca, clen, cs, isTrusted);
246 return safeTrim(ca, cb.position(), cs, isTrusted);
274 private Charset cs;
279 private StringEncoder(Charset cs, String rcn) {
281 this.cs = cs;
282 this.ce = cs.newEncoder()
285 this.isTrusted = (cs.getClass().getClassLoader0() == null);
289 if (cs instanceof HistoricallyNamedCharset)
290 return ((HistoricallyNamedCharset)cs).historicalName();
291 return cs.name();
305 return safeTrim(ba, blen, cs, isTrusted);
322 return safeTrim(ba, bb.position(), cs, isTrusted);
336 Charset cs = lookupCharset(csn);
337 if (cs != null)
338 se = new StringEncoder(cs, csn);
347 static byte[] encode(Charset cs, char[] ca, int off, int len) {
348 CharsetEncoder ce = cs.newEncoder();
355 if (!(isTrusted = (cs.getClass().getClassLoader0() == null))) {
365 return safeTrim(ba, blen, cs, isTrusted);
379 return safeTrim(ba, bb.position(), cs, isTrusted);