home *** CD-ROM | disk | FTP | other *** search
- package sun.awt;
-
- import java.nio.ByteBuffer;
- import java.nio.CharBuffer;
- import java.nio.charset.CharsetEncoder;
- import java.nio.charset.CoderResult;
- import java.nio.charset.CodingErrorAction;
-
- public class AWTCharset$Encoder extends CharsetEncoder {
- protected CharsetEncoder enc;
- // $FF: synthetic field
- final AWTCharset this$0;
-
- protected AWTCharset$Encoder(AWTCharset var1) {
- this(var1, var1.javaCs.newEncoder());
- }
-
- protected AWTCharset$Encoder(AWTCharset var1, CharsetEncoder var2) {
- super(var1.awtCs, var2.averageBytesPerChar(), var2.maxBytesPerChar());
- this.this$0 = var1;
- this.enc = var2;
- }
-
- public boolean canEncode(char var1) {
- return this.enc.canEncode(var1);
- }
-
- public boolean canEncode(CharSequence var1) {
- return this.enc.canEncode(var1);
- }
-
- protected CoderResult encodeLoop(CharBuffer var1, ByteBuffer var2) {
- return this.enc.encode(var1, var2, true);
- }
-
- protected CoderResult implFlush(ByteBuffer var1) {
- return this.enc.flush(var1);
- }
-
- protected void implReset() {
- this.enc.reset();
- }
-
- protected void implReplaceWith(byte[] var1) {
- if (this.enc != null) {
- this.enc.replaceWith(var1);
- }
-
- }
-
- protected void implOnMalformedInput(CodingErrorAction var1) {
- this.enc.onMalformedInput(var1);
- }
-
- protected void implOnUnmappableCharacter(CodingErrorAction var1) {
- this.enc.onUnmappableCharacter(var1);
- }
-
- public boolean isLegalReplacement(byte[] var1) {
- return true;
- }
- }
-