455 }
456 if (!shiftout) {
457 newshiftout = true;
458 ebyte[index++] = ISO_SO;
459 }
460 ebyte[index++] = (byte)(convByte[0] & 0x7f);
461 ebyte[index++] = (byte)(convByte[1] & 0x7f);
462 } else {
463 if((convByte[0] == SS2) && (convByte[1] == P2)) {
464 if (!SS2DesDefined) {
465 newSS2DesDefined = true;
466 ebyte[0] = ISO_ESC;
467 tmpByte = SS2Desig.getBytes();
468 System.arraycopy(tmpByte, 0, ebyte, 1, tmpByte.length);
469 index = tmpByte.length+1;
470 }
471 ebyte[index++] = ISO_ESC;
472 ebyte[index++] = ISO_SS2_7;
473 ebyte[index++] = (byte)(convByte[2] & 0x7f);
474 ebyte[index++] = (byte)(convByte[3] & 0x7f);
475 }
476 if((convByte[0] == SS2)&&(convByte[1] == 0xA3))
477 {
478 if(!SS3DesDefined){
479 newSS3DesDefined = true;
480 ebyte[0] = ISO_ESC;
481 tmpByte = SS3Desig.getBytes();
482 System.arraycopy(tmpByte, 0, ebyte, 1, tmpByte.length);
483 index = tmpByte.length+1;
484 }
485 ebyte[index++] = ISO_ESC;
486 ebyte[index++] = ISO_SS3_7;
487 ebyte[index++] = (byte)(convByte[2] & 0x7f);
488 ebyte[index++] = (byte)(convByte[3] & 0x7f);
489 }
490 }
491 return index;
492 }
493
494 private CoderResult encodeArrayLoop(CharBuffer src,
495 ByteBuffer dst)
496 {
497 char[] sa = src.array();
|
455 }
456 if (!shiftout) {
457 newshiftout = true;
458 ebyte[index++] = ISO_SO;
459 }
460 ebyte[index++] = (byte)(convByte[0] & 0x7f);
461 ebyte[index++] = (byte)(convByte[1] & 0x7f);
462 } else {
463 if((convByte[0] == SS2) && (convByte[1] == P2)) {
464 if (!SS2DesDefined) {
465 newSS2DesDefined = true;
466 ebyte[0] = ISO_ESC;
467 tmpByte = SS2Desig.getBytes();
468 System.arraycopy(tmpByte, 0, ebyte, 1, tmpByte.length);
469 index = tmpByte.length+1;
470 }
471 ebyte[index++] = ISO_ESC;
472 ebyte[index++] = ISO_SS2_7;
473 ebyte[index++] = (byte)(convByte[2] & 0x7f);
474 ebyte[index++] = (byte)(convByte[3] & 0x7f);
475 } else if((convByte[0] == SS2)&&(convByte[1] == P3)) {
476 if(!SS3DesDefined){
477 newSS3DesDefined = true;
478 ebyte[0] = ISO_ESC;
479 tmpByte = SS3Desig.getBytes();
480 System.arraycopy(tmpByte, 0, ebyte, 1, tmpByte.length);
481 index = tmpByte.length+1;
482 }
483 ebyte[index++] = ISO_ESC;
484 ebyte[index++] = ISO_SS3_7;
485 ebyte[index++] = (byte)(convByte[2] & 0x7f);
486 ebyte[index++] = (byte)(convByte[3] & 0x7f);
487 }
488 }
489 return index;
490 }
491
492 private CoderResult encodeArrayLoop(CharBuffer src,
493 ByteBuffer dst)
494 {
495 char[] sa = src.array();
|