private void writeFile() {
			int id = getNextId();
			File f = getFile(id);
			try {
				fileSync.lock();
				try {
					FileOutputStream fos = new FileOutputStream(f);
					try {
						GZIPOutputStream gos = new GZIPOutputStream(fos);
						DataOutputStream dos = new DataOutputStream(gos);
						dos.writeInt(writeQueue.size());
						for (Hash h : writeQueue) {
							dos.writeLong(h.getHash());
						}
						for (Hash h : writeQueue) {
							dos.writeInt(h.getLength());
							h.put(dos);
						}
						dos.flush();
						dos.close();
						long[] hashes = new long[writeQueue.size()];
						for (int i = 0; i < hashes.length; i++) {
							hashes[i] = writeQueue.get(i).getHash();
						}
						writeQueue.clear();
						writeNotifyQueue.add(new NotifyQueueLink(id, hashes));
					} finally {
						fos.close();
					}
					if (f.exists()) {
						used += f.length();
						
					}
				} finally {
					fileSync.unlock();
					updateFileSize();
				}
			} catch (IOException e) {
				Thread.currentThread().interrupt();
			}
		}