(long[] dir, final int slot)
| 151 | } |
| 152 | |
| 153 | static final long[] dirRemove(long[] dir, final int slot){ |
| 154 | int offset = dirOffsetFromSlot(dir, slot); |
| 155 | if(CC.ASSERT && offset<=0){ |
| 156 | throw new DBException.DataCorruption("offset too low"); |
| 157 | } |
| 158 | //shrink and copy data |
| 159 | long[] dir2 = new long[dir.length - 2]; |
| 160 | System.arraycopy(dir, 0, dir2, 0, offset); |
| 161 | System.arraycopy(dir, offset + 2, dir2, offset, dir2.length - offset); |
| 162 | |
| 163 | //unset bitmap bit |
| 164 | int bytePos = slot / 64; |
| 165 | int bitPos = slot % 64; |
| 166 | dir2[bytePos] = (dir2[bytePos] & ~(1L << bitPos)); |
| 167 | return dir2; |
| 168 | } |
| 169 | |
| 170 | |
| 171 | /** |
no test coverage detected