I need to print a representation of an ArrayList of strings to the given output stream (out):
public void outputBag(OutputStream out)
throws IOException
{
}
I'd usually do this in the main function by using writer and be done with it. But I have to use the above method this time. Thing is, I have no idea how OutputStream is supposed to work, I spent a couple of hours reading javadocs and watching videos but to no avail.
Can you guys show me an example of how I'd do this?
Thank you.