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