Writes all meta data to disk. @throws IOException I/O exception
()
| 132 | * @throws IOException I/O exception |
| 133 | */ |
| 134 | private void write() throws IOException { |
| 135 | if(!meta.dirty) return; |
| 136 | |
| 137 | try(DataOutput out = new DataOutput(meta.dbFile(DATAINF))) { |
| 138 | meta.write(out); |
| 139 | out.writeToken(token(DBTAGS)); |
| 140 | elemNames.write(out); |
| 141 | out.writeToken(token(DBATTS)); |
| 142 | attrNames.write(out); |
| 143 | out.writeToken(token(DBPATH)); |
| 144 | paths.write(out); |
| 145 | out.writeToken(token(DBNS)); |
| 146 | nspaces.write(out); |
| 147 | out.writeToken(token(DBDOCS)); |
| 148 | resources.write(out); |
| 149 | out.write(0); |
| 150 | } |
| 151 | // file may be missing if flag was just enabled |
| 152 | if(meta.updindex && idmap != null) idmap.write(meta.dbFile(DATAIDP)); |
| 153 | meta.dirty = false; |
| 154 | } |
| 155 | |
| 156 | @Override |
| 157 | public synchronized void close() { |
no test coverage detected