public static byte[] getBytesFromStream(InputStream is) throws IOException {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		byte[] bytes = new byte[4096];
		int n;
		while ((n = is.read(bytes)) > 0) {
			baos.write(bytes, 0, n);
		}
		return baos.toByteArray();
	}
Reads the bytes from the stream into a byte array
@param is the input stream to read
@return a byte[] containing the bytes from the stream.
@throws IOException if an I/O error occurs reading
Ghidra/Framework/Utility/src/main/java/utilities/util/FileUtilities.java