This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes sequence input stream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "sequence input stream" Watch "sequence input stream" New topic

sequence input stream

smriti singla

Joined: Nov 14, 2000
Posts: 18
i am facing a problem in the following program based on SequenceInputStream class.i am getting a compile time error as following resolve symbol
symbol : constructor SequenceInputStream(S)
location: class
InputStream d=new SequenceInputStream(s);
The program is as follows:
import java.util.*;
class Seq implements Iterator
public String[] g;
public int f=0;

public Seq(String[] g)
public boolean hasNext()
/* please take sign "*" as (less than) sign in above statement as i am facing difficulty in posting this program as it is taking it as a HTML tag*/
return true;
return false;
public Object next()
InputStream i=null;
throw new NoSuchElementException("no more files");
String next=g[f];
i=new FileInputStream(next);
catch(FileNotFoundException e){
System.err.println("ListOfFiles: Can't open " + next);}
return i;
public void remove()
public class Sequence
public static void main(String[] args) throws IOException
int j;
Seq s=new Seq(args);
InputStream d = new SequenceInputStream(s);
while ((j = != -1)
Any help will be highly appreciated.
Smriti Singla
[This message has been edited by smriti singla (edited January 31, 2001).]
Sridevi Shrikanth
Ranch Hand

Joined: Jan 11, 2001
Posts: 31
This might be because SequenceInputStream takes
Enumeration and Not Iterator as an constructor argument.
I agree. Here's the link:
subject: sequence input stream
jQuery in Action, 3rd edition