docs: @SuppressWarnings("resource")
  	@Override
  	public void close() throws IOException {
  		if (this.tmpFile.canRead()) {
  			try {
  				this.tmpOutput.close();
  
  				try (WritableByteChannel out = Channels.newChannel(this.output)) {
  					try (ReadableByteChannel in = Channels.newChannel(new FileInputStream(this.tmpFile))) {
  						// Write the header
  						final int limit = HEADER_KEY.getBytes().length + 6;
  						final ByteBuffer hBuffer = ByteBuffer.allocate(limit);
  						hBuffer.limit(limit);
  						in.read(hBuffer);
  						hBuffer.position(HEADER_KEY.getBytes().length + 2);
  						hBuffer.putInt(this.length);
  						hBuffer.rewind();
  						out.write(hBuffer);
  						// Write the objects
  						final ByteBuffer buffer = ByteBuffer.allocate(4096);
  						int read;
  						while ((read = in.read(buffer)) >= 0) {
  							buffer.rewind();
  							buffer.limit(read);
  							out.write(buffer);
  							buffer.rewind();
  							buffer.limit(buffer.capacity());
  						}
  					}
  				}
  			} finally {
  				this.tmpFile.delete();
  			}
  		}
  	}