@Override
	public short getShort(BigInteger bigIndex) throws ByteBlockAccessException {
		int index = bigIndex.intValue();
		if (index < buf.length) {
			byte[] b = new byte[2];
			System.arraycopy(buf, index, b, 0, b.length);
			return converter.getShort(b);
		}
		return 0;
	}
ByteBlock for a byte buffer read from a file.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java