Re: BufferedReader do not change output for new file




<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



.



Relevant Pages

  • Re: speed problems
    ... > First off you're using exernal programs here for decompression. ... > trade off of making a system call vs internal implementation. ... > If I read this correctly you're compiling this regex every time you're ... > going through the for loop. ...
    (comp.lang.python)
  • Re: Opinions on Atmel Studio4 sw?
    ... main whileloop. ... PORTD does update, so I'm wondering if I've missed ... optimizing settings, which can confuse the debugger, because ... Try compiling it in debug mode, ...
    (comp.arch.embedded)
  • Re: removing a loop cause it to go at half the speed?
    ... array for the operation caused the whole program to spend twice the time to complete. ... If the loop is included it takes about 7.48 seconds to complete, but when removed it takes about 11.48 seconds. ... Try measuring without compiling with optimizations. ...
    (comp.unix.programmer)
  • Re: algorithm by eratosthenos
    ... I can't see how I would make the main control for this. ... is a for loop and a test condition. ... If you post to comp.lang.c, please post minimal, compiling ...
    (comp.lang.c)