@Override
	public synchronized int putInt(int offset, int v) throws IndexOutOfBoundsException, IOException {
		if (readOnly) {
			throw new UnsupportedOperationException("Read-only buffer");
		}
		int bufferOffset = dataBaseOffset + (offset % dataSpace);
		if (bufferOffset + 3 <= dataSpace) {
			if (dataBufferIdTable == null) {
				throw new AssertException("Invalid Buffer");
			}
			if (offset < 0 || (offset + 3) >= size) {
				throw new IndexOutOfBoundsException();
			}
			if (useXORMask) {
				v = v ^ (int) getXorMask(offset % dataSpace, 4);
			}
			DataBuffer buffer = getBuffer(offset / dataSpace);
			buffer.putInt(bufferOffset, v);
			bufferMgr.releaseBuffer(buffer);
		}
		else {
			byte[] data = new byte[4];
			data[0] = (byte) (v >> 24);
			data[1] = (byte) (v >> 16);
			data[2] = (byte) (v >> 8);
			data[3] = (byte) v;
			put(offset, data);
		}
		return offset + 4;
	}
Fill buffer with data provided by InputStream.  If 
stream is exhausted, the remainder of the buffer will be filled
with 0's.
@param in data source
@throws IOException thrown if IO error occurs.
Ghidra/Framework/DB/src/main/java/db/ChainedBuffer.java