@Override
		public BufferFileBlock readBlock() throws IOException {
			byte[] data = new byte[blockSize];
			int total = 0;
			while (total < blockSize) {
				int readlen = fin.read(data, total, blockSize - total);
				if (readlen < 0) {
					if (total == 0 && nextIndex == blockCount) {
						return null;
					}
					throw new EOFException("unexpected end of file");
				}
				total += readlen;
			}
			return new BufferFileBlock(nextIndex++, data);
		}
Construct input block stream for entire file
@throws IOException if an I/O error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java