Re: BufferedReader do not change output for new file
- From: "Bjorn Abelli" <bjorn_abelli@xxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Jul 2007 08:58:44 +0200
<gupta.divyendu@xxxxxxxxx> wrote...
I am using this code
Sorry, but you can't, as it's not compilable.
Even when wrapped into a method in a class, there are still errors left when
compiling.
For example, what do you mean by these lines:
if(start>0){
filecode=filecode+inputLine;
if(inputLine.indexOf("/dp/B")>1) // <-- no sentence!
}
And this is definitely wrong:
fielcode=null;
Not only is it misspelled, it probably doesn't do what you want.
I think you want to change that to e.g.
filecode = "";
....unless you want all "filecodes" to start with the string "null", which
becomes the result in the loop at the first
filecode = filecode + inputLine;
*** The problem is that for eack different variable value of k in
loop, different URL is created so String filecode should also have
different value for each different value of k, but this is not so.
variable filecode value remains the same. for each different URL
(variable m)
PLEASE HELP
However, when I made these changes, and deleted the if-sentence that didn't
do anything, each filecode *was* different.
Could it be that your code didn't compile (as it can't in your posted
version), and you run an old version that only retrieves one page?
To be able to help you out you should try to make an SSCCE to post here:
http://www.physci.org/codes/sscce.html
/// Bjorn A
.
- Follow-Ups:
- Re: BufferedReader do not change output for new file
- From: Roedy Green
- Re: BufferedReader do not change output for new file
- References:
- BufferedReader do not change output for new file
- From: gupta . divyendu
- BufferedReader do not change output for new file
- Prev by Date: BufferedReader do not change output for new file
- Next by Date: Re: @override?
- Previous by thread: BufferedReader do not change output for new file
- Next by thread: Re: BufferedReader do not change output for new file
- Index(es):
Relevant Pages
|
|