void () { final int prev = depth++; if (depth >= capacity) { capacity *= 2; levelIndent = Arrays.copyOf(levelIndent, capacity); levelEOL = Arrays.copyOf(levelEOL, capacity); levelEOLIndent = Arrays.copyOf(levelEOLIndent, capacity); termEOLIndent = Arrays.copyOf(termEOLIndent, capacity); ignoreTrAXEscapingPIs = Arrays.copyOf(ignoreTrAXEscapingPIs, capacity); mode = Arrays.copyOf(mode, capacity); escapeOutput = Arrays.copyOf(escapeOutput, capacity); } ignoreTrAXEscapingPIs[depth] = ignoreTrAXEscapingPIs[prev]; mode[depth] = mode[prev]; escapeOutput[depth] = escapeOutput[prev]; if (levelIndent[prev] == null || levelEOL[prev] == null) { levelIndent[depth] = null; levelEOL[depth] = null; levelEOLIndent[depth] = null; termEOLIndent[depth] = null; } else if (levelIndent[depth] == null) { // we need to build our level details .... // cannot reuse previous ones. levelEOL[depth] = levelEOL[prev]; termEOLIndent[depth] = levelEOL[depth] + levelIndent[prev]; levelIndent[depth] = levelIndent[prev] + indent; levelEOLIndent[depth] = levelEOL[depth] + levelIndent[depth]; } }