private String pad(String str, int length) {
		StringBuffer sb = new StringBuffer();
		int nspaces = length - str.length();
		for (int i = 0; i < nspaces; i++) {
			sb.append(" ");
		}
		sb.append(str);
		return sb.toString();
	}
ByteBlock for a byte buffer read from a file.
Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/FileByteBlock.java