/** * Returns the URI of the given node. * @param free True to free URI index. */ public String getNodeURI(int nodeIndex, boolean free) { if (nodeIndex == -1) { return null; } int chunk = nodeIndex >> CHUNK_SHIFT; int index = nodeIndex & CHUNK_MASK; return free ? clearChunkValue(fNodeURI, chunk, index) : getChunkValue(fNodeURI, chunk, index); } // getNodeURI(int,int):String
/** * Returns the name of the given node. * @param free True to free the string index. */ public String getNodeName(int nodeIndex, boolean free) { if (nodeIndex == -1) { return null; } int chunk = nodeIndex >> CHUNK_SHIFT; int index = nodeIndex & CHUNK_MASK; return free ? clearChunkValue(fNodeName, chunk, index) : getChunkValue(fNodeName, chunk, index); } // getNodeName(int,boolean):String
/** * Returns the value of the given node. * @param free True to free the value index. */ public String getNodeValue(int nodeIndex, boolean free) { if (nodeIndex == -1) { return null; } int chunk = nodeIndex >> CHUNK_SHIFT; int index = nodeIndex & CHUNK_MASK; return free ? clearChunkValue(fNodeValue, chunk, index) : getChunkValue(fNodeValue, chunk, index); } // getNodeValue(int,boolean):String
private final String setChunkValue(Object data[][], Object value, int chunk, int index) { if (value == null) { return clearChunkValue(data, chunk, index); } Object [] dataChunk = data[chunk]; // Re-create chunk if it was deleted. if (dataChunk == null) { createChunk(data, chunk); dataChunk = data[chunk]; } String ovalue = (String) dataChunk[index]; if (ovalue == null) { RefCount c = (RefCount) dataChunk[CHUNK_SIZE]; c.fCount++; } dataChunk[index] = value; return ovalue; }
String value = free ? clearChunkValue(fNodeValue, chunk, index) : getChunkValue(fNodeValue, chunk, index); if (value == null) {
clearChunkValue(fNodeName, oachunk, oaindex); clearChunkValue(fNodeValue, oachunk, oaindex); clearChunkIndex(fNodeParent, oachunk, oaindex); clearChunkIndex(fNodePrevSib, oachunk, oaindex); int atindex = attrTextIndex & CHUNK_MASK; clearChunkIndex(fNodeType, atchunk, atindex); clearChunkValue(fNodeValue, atchunk, atindex); clearChunkIndex(fNodeParent, atchunk, atindex); clearChunkIndex(fNodeLastChild, atchunk, atindex);