Lines Matching refs:dest

80      * @param dest The destination array that will receive the result.
98 char[] dest, int destStart, int destSize) throws ArabicShapingException {
107 if (dest == null && destSize != 0) {
108 throw new IllegalArgumentException("null dest requires destSize == 0");
111 (destStart < 0 || destSize < 0 || destStart + destSize > dest.length)) {
112 throw new IllegalArgumentException("bad dest start (" + destStart +
114 ") for buffer of length " + dest.length);
141 return internalShape(source, sourceStart, sourceLength, dest, destStart, destSize);
171 char[] dest = src;
175 dest = new char[src.length * 2]; // max
177 int len = shape(src, 0, src.length, dest, 0, dest.length);
179 return new String(dest, 0, len);
858 private void shapeToArabicDigitsWithContext(char[] dest,
866 char ch = dest[i];
877 dest[i] = (char)(ch + digitBase);
969 private static int countSpacesLeft(char[] dest,
973 if (dest[i] != SPACE_CHAR) {
980 private static int countSpacesRight(char[] dest,
985 if (dest[i] != SPACE_CHAR) {
1176 public static int countSpaceSub(char [] dest,int length, char subChar){
1180 if (dest[i] == subChar) {
1192 public static void shiftArray(char [] dest,int start, int e, char subChar){
1196 char ch = dest[r];
1200 dest[w] = ch;
1210 public static int flipArray(char [] dest, int start, int e, int w){
1217 dest[w++] = dest[r++];
1234 private static int handleTashkeelWithTatweel(char[] dest, int sourceLength) {
1237 if((isTashkeelOnTatweelChar(dest[i]) == 1)){
1238 dest[i] = TATWEEL_CHAR;
1239 }else if((isTashkeelOnTatweelChar(dest[i]) == 2)){
1240 dest[i] = SHADDA_TATWEEL_CHAR;
1241 }else if((isIsolatedTashkeelChar(dest[i])==1) && dest[i] != SHADDA_CHAR){
1242 dest[i] = SPACE_CHAR;
1266 private int handleGeneratedSpaces(char[] dest,
1291 if (dest[i] == LAMALEF_SPACE_SUB) {
1292 dest[i] = SPACE_CHAR_FOR_LAMALEF;
1299 int wL = countSpaceSub(dest, length, LAMALEF_SPACE_SUB);
1300 int wT = countSpaceSub(dest, length, TASHKEEL_SPACE_SUB);
1311 shiftArray(dest, start, e, LAMALEF_SPACE_SUB);
1313 dest[--wL] = SPACE_CHAR;
1318 shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);
1320 dest[--wT] = SPACE_CHAR;
1335 shiftArray(dest, start, e, LAMALEF_SPACE_SUB);
1336 wL = flipArray(dest,start,e, wL);
1340 shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);
1341 wT = flipArray(dest,start,e, wT);
1358 shiftArray(dest, start, e, LAMALEF_SPACE_SUB);
1359 wL = flipArray(dest,start,e, wL);
1361 dest[wL++] = SPACE_CHAR;
1365 shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);
1366 wT = flipArray(dest,start,e, wT);
1368 dest[wT++] = SPACE_CHAR;
1385 private boolean expandCompositCharAtBegin(char[] dest,int start, int length,
1389 if (lacount > countSpacesRight(dest, start, length)) {
1394 char ch = dest[r];
1396 dest[--w] = LAM_CHAR;
1397 dest[--w] = convertNormalizedLamAlef[ch - '\u065C'];
1399 dest[--w] = ch;
1415 private boolean expandCompositCharAtEnd(char[] dest,int start, int length,
1419 if (lacount > countSpacesLeft(dest, start, length)) {
1424 char ch = dest[r];
1426 dest[w++] = convertNormalizedLamAlef[ch - '\u065C'];
1427 dest[w++] = LAM_CHAR;
1429 dest[w++] = ch;
1442 private boolean expandCompositCharAtNear(char[] dest,int start, int length,
1449 if (isNormalizedLamAlefChar(dest[start])) {
1454 char ch = dest[i];
1456 if (i>start &&dest[i-1] == SPACE_CHAR) {
1457 dest[i] = LAM_CHAR;
1458 dest[--i] = convertNormalizedLamAlef[ch - '\u065C'];
1464 if(i>start &&dest[i-1] == SPACE_CHAR){
1465 dest[i-1] = tailChar;
1472 if(i>start &&dest[i-1] == SPACE_CHAR){
1473 dest[i] = yehHamzaToYeh[ch - YEH_HAMZAFE_CHAR];
1474 dest[i-1] = HAMZAFE_CHAR;
1497 private int expandCompositChar(char[] dest,
1519 spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount);
1521 spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount);
1524 spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1);
1530 spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount);
1532 spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount);
1535 spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1);
1542 spaceNotFound = expandCompositCharAtEnd(dest, start, length, lacount);
1547 spaceNotFound = expandCompositCharAtBegin(dest, start, length, lacount);
1552 spaceNotFound = expandCompositCharAtNear(dest, start, length,0,0,1);
1558 char ch = dest[r];
1560 dest[--w] = '\u0644';
1561 dest[--w] = convertNormalizedLamAlef[ch - '\u065C'];
1563 dest[--w] = ch;
1570 spaceNotFound = expandCompositCharAtNear(dest, start, length,0,1,0);
1576 spaceNotFound = expandCompositCharAtNear(dest, start, length,1,0,0);
1591 private int normalize(char[] dest, int start, int length) {
1594 char ch = dest[i];
1599 dest[i] = (char)convertFEto06[ch - '\uFE70'];
1614 private int deshapeNormalize(char[] dest, int start, int length) {
1623 char ch = dest[i];
1626 && (i < (length - 1)) && isAlefMaksouraChar(dest[i+1] )) {
1627 dest[i] = SPACE_CHAR;
1628 dest[i+1] = YEH_HAMZA_CHAR;
1630 && (isSeenTailFamilyChar(dest[i+1])==1) ) {
1631 dest[i] = SPACE_CHAR;
1637 dest[i] = (char)convertFEto06[ch - '\uFE70'];
1648 private int shapeUnicode(char[] dest,
1654 int lamalef_count = normalize(dest, start, length);
1664 int currLink = getLink(dest[i]);
1675 if ((currLink & '\uFF00') > 0 || isTashkeelChar(dest[i])) {
1683 nextLink = getLink(dest[nw]);
1694 char wLamalef = changeLamAlef(dest[i]); // get from 0x065C-0x065f
1697 dest[i] = '\uffff';
1698 dest[lastPos] = wLamalef;
1705 if ((i > 0) && (dest[i-1] == SPACE_CHAR))
1707 if ( isSeenFamilyChar(dest[i]) == 1){
1709 } else if (dest[i] == YEH_HAMZA_CHAR) {
1714 if ( isSeenFamilyChar(dest[i]) == 1){
1716 } else if (dest[i] == YEH_HAMZA_CHAR) {
1726 int flag = specialChar(dest[i]);
1738 dest[i] != '\u064C' &&
1739 dest[i] != '\u064D' &&
1750 dest[i] = TASHKEEL_SPACE_SUB;
1754 dest[i] = (char)('\uFE70' + irrelevantPos[dest[i] - '\u064B'] + shape);
1758 dest[i] = (char)('\uFE70' + (currLink >> 8) + shape);
1775 currLink = getLink(dest[i]);
1784 destSize = handleGeneratedSpaces(dest, start, length);
1787 destSize = expandCompositChar(dest, start, destSize, lamalef_count, SHAPE_MODE);
1797 private int deShapeUnicode(char[] dest,
1802 int lamalef_count = deshapeNormalize(dest, start, length);
1806 // need to adjust dest to fit expanded buffer... !!!
1807 destSize = expandCompositChar(dest, start, length, lamalef_count,DESHAPE_MODE);
1818 char[] dest,
1937 System.arraycopy(temp, 0, dest, destStart, outputSize);