public void saveItem(OutputStream out, TaskMonitor monitor) throws IOCancelledException,
			IOException {

		if (saved) {
			throw new IllegalStateException("Already saved");
		}
		saved = true;

		ZipInputStream zipIn = new ZipInputStream(in);
		ZipEntry entry = zipIn.getNextEntry();
		if (entry == null || !ZIP_ENTRY_NAME.equals(entry.getName())) {
			throw new IOException("Data error");
		}
//		if (length != entry.getSize()) {
//			throw new IOException("Content length is " + entry.getSize() + ", expected " + length);
//		}

		InputStream itemIn = zipIn;
		if (monitor != null) {
			itemIn = new MonitoredInputStream(zipIn, monitor);
			monitor.initialize((int) length);
		}
		long len = length;
		byte[] buffer = new byte[IO_BUFFER_SIZE];

		// Copy file contents
		int cnt = (int) (len < IO_BUFFER_SIZE ? len : IO_BUFFER_SIZE);
		while ((cnt = itemIn.read(buffer, 0, cnt)) > 0) {
			out.write(buffer, 0, cnt);
			len -= cnt;
			cnt = (int) (len < IO_BUFFER_SIZE ? len : IO_BUFFER_SIZE);
		}

	}
Save the item to the specified output stream.
This method may only be invoked once.
@param out
@param monitor
@throws IOException
Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/store/local/ItemDeserializer.java