What's the role of "resourceName" in DeploymentBuilder.addInputStream?

Working with DeploymentBuilder I came across a doubt that I couldn’t figure out. When calling the method addInputStream of DeploymentBuilder interface, the method wants two parameters: one is the InputStream, and the other is String resourceName. What is this resource name and how it is used?
In my case, the inputstream I’m passing is built this way:

InputStream is = new ByteArrayInputStream(file.getBytes(Charset.forName("UTF-8")));

where file is a String representation of the xml I want to deploy. What should be set as resourceName? I only have a String in this case. I’ve tried passing a random name and the deploy is working correctly, so I don’t know what this resource name is used for. What should be passed? How does the DeploymentBuilder use this information to deploy? And above all, is it fundamental?