@Override
	public synchronized int putByte(int offset, byte b) throws IndexOutOfBoundsException, IOException {
		if (readOnly) {
			throw new UnsupportedOperationException("Read-only buffer");
		}
		if (dataBufferIdTable == null) {
			throw new AssertException("Invalid Buffer");
		}
		if (offset < 0 || offset >= size) {
			throw new IndexOutOfBoundsException();
		}
		DataBuffer buffer = getBuffer(offset / dataSpace);
		int bufferDataOffset = offset % dataSpace;
		if (useXORMask) {
			b = xorMaskByte(bufferDataOffset, b);
		}
		buffer.putByte(dataBaseOffset + bufferDataOffset, b);
		bufferMgr.releaseBuffer(buffer);
		return offset + 1;
	}
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