/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
* THIS FILE WAS MODIFIED BY SUN MICROSYSTEMS, INC.
*/
private int _initialCapacity;
private static class PrefixEntry {
private int prefixId;
}
private static class NamespaceEntry {
private int declarationId;
private int namespaceIndex;
private int prefixEntryIndex;
}
public int[] _currentInScope;
public int _declarationId;
// Sizes of _inScopeNamespaces and _currentInScope need to be two
// greater than _array because 0 represents the empty string and
// 1 represents the xml prefix
}
public PrefixArray() {
this(DEFAULT_CAPACITY, MAXIMUM_CAPACITY);
}
private final void initializeEntries() {
int index = KeyIntMap.indexFor(KeyIntMap.hashHash(_inScopeNamespaces[0].prefix.hashCode()), _prefixMap.length);
index = KeyIntMap.indexFor(KeyIntMap.hashHash(_inScopeNamespaces[1].prefix.hashCode()), _prefixMap.length);
} else {
}
}
if (_namespacePool == null) {
_namespacePool = new NamespaceEntry();
}
for (int i = 0; i < capacity; i++) {
_namespacePool = ne;
}
}
if (_prefixPool == null) {
_prefixPool = new PrefixEntry();
}
for (int i = 0; i < capacity; i++) {
_prefixPool = pe;
}
}
public int countNamespacePool() {
int i = 0;
while (e != null) {
i++;
e = e.next;
}
return i;
}
public int countPrefixPool() {
int i = 0;
PrefixEntry e = _prefixPool;
while (e != null) {
i++;
e = e.next;
}
return i;
}
public final void clear() {
for (int i = _readOnlyArraySize; i < _size; i++) {
}
}
public final void clearCompletely() {
_prefixPool = null;
_currentInScope[i] = 0;
_inScopeNamespaces[i] = null;
}
_prefixMap[i] = null;
}
_declarationId = 0;
clear();
}
return _array;
}
if (!(readOnlyArray instanceof PrefixArray)) {
}
}
if (readOnlyArray != null) {
// Resize according to size of read only arrays
// Intialize first two entries
if (clear) {
clear();
}
_array = getCompleteArray();
}
}
if (_readOnlyArray == null) {
return _array;
} else {
return a;
}
}
return _array[i];
}
resize();
}
return _size;
}
protected final void resize() {
if (_size == _maximumCapacity) {
throw new ValueArrayResourceException(CommonResourceBundle.getInstance().getString("message.arrayMaxCapacity"));
}
if (newSize > _maximumCapacity) {
}
newSize += 2;
final int[] newCurrentInScope = new int[newSize];
}
public final void clearDeclarationIds() {
for (int i = 0; i < _size; i++) {
final NamespaceEntry e = _inScopeNamespaces[i];
if (e != null) {
e.declarationId = 0;
}
}
_declarationId = 1;
}
if (_namespacePool == null) {
}
final NamespaceEntry e = _namespacePool;
_namespacePool = e.next;
} else {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.duplicateNamespaceAttribute"));
}
}
if (_namespacePool == null) {
}
if (_prefixPool == null) {
increasePrefixPool(16);
}
final NamespaceEntry e = _namespacePool;
_namespacePool = e.next;
} else {
throw new FastInfosetException(CommonResourceBundle.getInstance().getString("message.duplicateNamespaceAttribute"));
}
final PrefixEntry p = _prefixPool;
p.prefixId = prefixIndex;
_prefixMap[e.prefixEntryIndex] = p;
}
e.next = _namespacePool;
_namespacePool = e;
}
e.next = _namespacePool;
_namespacePool = e;
} else {
break;
}
}
}
}
return ne.namespaceName;
}
}
return null;
}
int position = 0;
}
}
return null;
}
return new Iterator() {
int _position = 1;
public boolean hasNext() {
}
throw new NoSuchElementException();
}
moveToNext();
return prefix;
}
public void remove() {
throw new UnsupportedOperationException();
}
private final void moveToNext() {
return;
}
}
}
};
}
return new Iterator() {
int _position = 0;
{
moveToNext();
}
public boolean hasNext() {
}
throw new NoSuchElementException();
}
moveToNext();
return prefix;
}
public void remove() {
throw new UnsupportedOperationException();
}
private final void moveToNext() {
return;
}
}
}
};
}
}