CollationElementIteratorICU.java revision cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1f
1adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project/** 2adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project******************************************************************************* 3adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* Copyright (C) 1996-2005, International Business Machines Corporation and * 4adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* others. All Rights Reserved. * 5adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project******************************************************************************* 6adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* 7adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project******************************************************************************* 8adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project*/ 9adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project 10cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughespackage libcore.icu; 11adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project 12adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Projectimport java.text.CharacterIterator; 13adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project 14adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project/** 15adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* Collation element iterator JNI wrapper. 16adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* Iterates over the collation elements of a data string. 17f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* The iterator supports both forward and backwards full iteration, ie if 18f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* backwards iteration is performed in the midst of a forward iteration, the 19f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* result is undefined. 20f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* To perform a backwards iteration in the midst of a forward iteration, 21f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* reset() has to be called. 22f33eae7e84eb6d3b0f4e86b59605bb3de73009f3Elliott Hughes* This will shift the position to either the start or the last character in the 23adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* data string depending on whether next() is called or previous(). 24adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* <pre> 25adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* RuleBasedCollator coll = Collator.getInstance(); 26adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* CollationElementIterator iterator = coll.getCollationElementIterator("abc"); 27adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* int ce = 0; 28adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* while (ce != CollationElementIterator.NULLORDER) { 29adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* ce = iterator.next(); 30adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* } 31adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* iterator.reset(); 32adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* while (ce != CollationElementIterator.NULLORDER) { 33adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* ce = iterator.previous(); 34adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* } 35adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* </pre> 36adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* @author syn wee quek 37adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project* @stable ICU 2.4 38adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project*/ 39cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughespublic final class CollationElementIteratorICU { 40e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // public data member ------------------------------------------- 41e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 42e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 43e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 44e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 45e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public static final int NULLORDER = 0xFFFFFFFF; 46e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 47e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // public methods ----------------------------------------------- 48e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 49e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 50e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Reset the collation elements to their initial state. 51e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * This will move the 'cursor' to the beginning of the text. 52e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 53e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 54e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public void reset() { 55e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom NativeCollation.reset(m_collelemiterator_); 56e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 57e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 58e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 59e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Get the ordering priority of the next collation element in the text. 60e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * A single character may contain more than one collation element. 61e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return next collation elements ordering, or NULLORDER if the end of the 62e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * text is reached. 63e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 64e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 65e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public int next() { 66e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return NativeCollation.next(m_collelemiterator_); 67e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 68e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 69e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 70e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Get the ordering priority of the previous collation element in the text. 71e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * A single character may contain more than one collation element. 72e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return previous collation element ordering, or NULLORDER if the end of 73e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * the text is reached. 74e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 75e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 76e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public int previous() { 77e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return NativeCollation.previous(m_collelemiterator_); 78e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 79e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 80e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 81e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Get the maximum length of any expansion sequences that end with the 82e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * specified comparison order. 83e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param order collation order returned by previous or next. 84e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return maximum size of the expansion sequences ending with the collation 85e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * element or 1 if collation element does not occur at the end of 86e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * any expansion sequence 87e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 88e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 89e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public int getMaxExpansion(int order) { 90e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return NativeCollation.getMaxExpansion(m_collelemiterator_, order); 91e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 92e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 93e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 94e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Set the text containing the collation elements. 95e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param source text containing the collation elements. 96e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 97e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 98e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public void setText(String source) { 99e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom NativeCollation.setText(m_collelemiterator_, source); 100e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 101e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 102e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // BEGIN android-added 103e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public void setText(CharacterIterator source) { 104e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom NativeCollation.setText(m_collelemiterator_, source.toString()); 105e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 106e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // END android-added 107e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 108e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 109e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Get the offset of the current source character. 110e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * This is an offset into the text of the character containing the current 111e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * collation elements. 112e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return offset of the current source character. 113e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 114e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 115e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public int getOffset() { 116e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return NativeCollation.getOffset(m_collelemiterator_); 117e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 118e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 119e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 120e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Set the offset of the current source character. 121e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * This is an offset into the text of the character to be processed. 122e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param offset The desired character offset. 123e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 124e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 125e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public void setOffset(int offset) { 126e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom NativeCollation.setOffset(m_collelemiterator_, offset); 127e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 128e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 129e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 130e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Gets the primary order of a collation order. 131e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param order the collation order 132e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return the primary order of a collation order. 133e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 134e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 135e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public static int primaryOrder(int order) { 136e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return ((order & PRIMARY_ORDER_MASK_) >> PRIMARY_ORDER_SHIFT_) & 137e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom UNSIGNED_16_BIT_MASK_; 138e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 139e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 140e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 141e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Gets the secondary order of a collation order. 142e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param order the collation order 143e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return the secondary order of a collation order. 144e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 145e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 146e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public static int secondaryOrder(int order) { 147e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return (order & SECONDARY_ORDER_MASK_) >> SECONDARY_ORDER_SHIFT_; 148e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 149e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 150e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 151e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Gets the tertiary order of a collation order. 152e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @param order the collation order 153e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @return the tertiary order of a collation order. 154e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 155e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 156e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom public static int tertiaryOrder(int order) { 157e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom return order & TERTIARY_ORDER_MASK_; 158e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 159e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 160cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes public static CollationElementIteratorICU getInstance(int collatorAddress, String source) { 161cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes int iteratorAddress = NativeCollation.getCollationElementIterator(collatorAddress, source); 162cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes return new CollationElementIteratorICU(iteratorAddress); 163cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes } 164e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 165cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes private CollationElementIteratorICU(int address) { 166cfa6ffebf3a63db7a125c4d9abe7e661fac5cc1fElliott Hughes m_collelemiterator_ = address; 167e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 168e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 169e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // protected methods -------------------------------------------- 170e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 171e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 172e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Garbage collection. 173e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Close C collator and reclaim memory. 174e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * @stable ICU 2.4 175e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 176e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom @Override protected void finalize() throws Throwable { 177e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom try { 178e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom NativeCollation.closeElements(m_collelemiterator_); 179e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } finally { 180e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom super.finalize(); 181e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 182e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom } 183e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 184e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom // private data members ----------------------------------------- 185e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 186e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 187e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * C collator 188e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 189e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private int m_collelemiterator_; 190e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom 191e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 192e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * ICU constant primary order mask for collation elements 193e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 194e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int PRIMARY_ORDER_MASK_ = 0xffff0000; 195e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 196e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * ICU constant secondary order mask for collation elements 197e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 198e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int SECONDARY_ORDER_MASK_ = 0x0000ff00; 199e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 200e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * ICU constant tertiary order mask for collation elements 201e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 202e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int TERTIARY_ORDER_MASK_ = 0x000000ff; 203e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 204e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * ICU constant primary order shift for collation elements 205e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 206e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int PRIMARY_ORDER_SHIFT_ = 16; 207e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 208e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * ICU constant secondary order shift for collation elements 209e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 210e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int SECONDARY_ORDER_SHIFT_ = 8; 211e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom /** 212e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom * Unsigned 16 bit mask 213e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom */ 214e2f58c9501eac730d048199906dc41fe8e4cd6e9Brian Carlstrom private static final int UNSIGNED_16_BIT_MASK_ = 0x0000FFFF; 215adc854b798c1cfe3bfd4c27d68d5cee38ca617daThe Android Open Source Project} 216