@Override
		public BufferFileBlock readBlock() throws IOException {
			synchronized (LocalBufferFile.this) {

				// Must add 1 to buffer index values to produce block index value.

				if (nextBufferIndex == getBufferCount()) {
					return null;
				}

				get(buf, nextBufferIndex);

				int blockIndex = (nextBufferIndex++) + 1;

				byte[] block = new byte[getBlockSize()];
				if (buf.isEmpty()) {
					block[0] = EMPTY_BUFFER; // Empty flag only
				}
				BigEndianDataConverter.INSTANCE.putInt(block, 1, buf.getId());
				if (!buf.isEmpty()) {
					byte[] data = buf.getData();
					System.arraycopy(data, 0, block, BUFFER_PREFIX_SIZE, data.length);
				}

				return new BufferFileBlock(blockIndex, block);
			}
		}
Construct input block stream for this buffer file.
@throws IOException	if an I/O error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java