443 |
Vector vect = new Vector(25); |
Vector vect = new Vector(25); |
444 |
|
|
445 |
int ord = cei.next(); |
int ord = cei.next(); |
446 |
|
cei.reset(); //set to start of string |
447 |
|
|
448 |
while (ord != CollationElementIterator.NULLORDER) |
while (ord != CollationElementIterator.NULLORDER) |
449 |
{ |
{ |
450 |
switch (getStrength()) |
switch (getStrength()) |
461 |
} |
} |
462 |
|
|
463 |
vect.add(new Integer(ord)); |
vect.add(new Integer(ord)); |
464 |
|
ord = cei.next(); //increment to next key |
465 |
} |
} |
466 |
|
|
467 |
Object[] objarr = vect.toArray(); |
Object[] objarr = vect.toArray(); |
468 |
byte[] key = new byte[objarr.length * 4]; |
byte[] key = new byte[objarr.length * 4]; |
469 |
|
|
470 |
for (int i = 0; i < key.length; i++) |
for (int i = 0; i < objarr.length; i++) |
471 |
{ |
{ |
472 |
int j = ((Integer)objarr[i]).intValue(); |
int j = ((Integer)objarr[i]).intValue(); |
473 |
key[i++] = (byte)((j & 0xFF000000) >> 24); |
key [i * 4] = (byte)((j & 0xFF000000) >> 24); |
474 |
key[i++] = (byte)((j & 0x00FF0000) >> 16); |
key [i * 4 + 1] = (byte)((j & 0x00FF0000) >> 16); |
475 |
key[i++] = (byte)((j & 0x0000FF00) >> 8); |
key [i * 4 + 2] = (byte)((j & 0x0000FF00) >> 8); |
476 |
key[i++] = (byte)(j & 0x000000FF); |
key [i * 4 + 3] = (byte)(j & 0x000000FF); |
477 |
} |
} |
478 |
|
|
479 |
return(new CollationKey(this, str, key)); |
return(new CollationKey(this, str, key)); |