@Override
	public void write(byte[] b, int off, int len) throws IOException {
		checkExpand(len);
		buffer.put(offset, b, off, len);
		offset += len;
	}
An output stream backed by a database chained buffer
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/database/DBBufferOutputStream.java