int read = stream.read(buffer, totalRead, MAX_STREAM_SIZE - totalRead);
if (read == -1) break; // End of Stream
totalRead += read;
} while(totalRead < MAX_STREAM_SIZE);
byte[] content = (totalRead > 0) ? Arrays.copyOf(buffer, totalRead) : new byte[0];
return new ROM(romURL.trim(), content);
}