Buffered Reader question I/O question

Joined
Aug 8, 2008
Messages
1
Reaction score
0
I have this function

crawler.addAnalyzer(new Analyzer() {

public void analyze(final Resource resource){
final BufferedReader in = new BufferedReader(new InputStreamReader(resource.getInputStream()));
System.out.println(in.readLine().toString());
}
});
I am trying to read out, to the console for right now the input in of my resource.

I get this error:

Main.java:120: unreported exception java.io.IOException; must be caught or declared to be thrown


But its been a while since I programmed java and forgot how to handle exceptions!! any advice?
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,805
Latest member
ClydeHeld1

Latest Threads

Top