Drop_of_Rain
asked on
I have the files How do I get them into ListOfFiles?
I have this code to create a list of files. I have the files How do I get them into ListOfFiles? I have some ideas but I will wait for more experience to make some suggestions. Can you show me in code please.
ListOfFiles mylist = new ListOfFiles(args);
List streams = new ArrayList();
while (mylist.hasMoreElements())
{
InputStream in = (InputStream) mylist.nextElement();
streams.add(AudioSystem.ge tAudioInpu tStream(in ));
}
SequenceInputStream s = new SequenceInputStream(format , streams);
ListOfFiles mylist = new ListOfFiles(args);
List streams = new ArrayList();
while (mylist.hasMoreElements())
{
InputStream in = (InputStream) mylist.nextElement();
streams.add(AudioSystem.ge
}
SequenceInputStream s = new SequenceInputStream(format
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, so what's the problem?
>> Yes, so what's the problem?
?????
You say "yes" to what question?
?????
You say "yes" to what question?
Your code was not there when I typed that ;-)
I wanted to hear some more details from Drop_of_rain.
I wanted to hear some more details from Drop_of_rain.
ASKER
I want to try the Enumeration process. I have to resolve this because this is a big part of my program. I made up some sample files to test it. I needed to be able to get the files into ListOfFiles because that is what Enumeration expects. ListOfFiles took its arguments from the command line. The code above was created to create that same list from an arraylist.
I think you have resolved this for me. I will wait for mayankeagle comments before I close.
Thanks
Christopher
I think you have resolved this for me. I will wait for mayankeagle comments before I close.
Thanks
Christopher
Well, if you're satisfied with zzynx's comments, then go ahead and close it :-)
Actually, yes, you do need an add () method to add the items.
Actually, yes, you do need an add () method to add the items.
>> I think you have resolved this for me.
Glad to hear that.
>> I will wait for mayankeagle comments before I close.
OK
Glad to hear that.
>> I will wait for mayankeagle comments before I close.
OK
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks you guys. I increased the points by 100 to give mmuruganandam some for his suggestion
What is ListOfFiles? Your own type? Is it a List?
A List can contain any objects.
A File is an object.
So a List can contain Files.