One option is to create a list of some kind and simply add an unwanted file to it in an endless loop.
Depending on the required accuracy, however, this may take some time - one way to speed this up would be to add large structures to the list items at the initial stage, and then capture OutOfMemoryError and try again with less materials until you get the accuracy. which you need.
source
share