• Post Reply Bookmark Topic Watch Topic
  • New Topic

InputStreams & POST  RSS feed

 
Rami Abusabi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I admin a website that has an IP tracker installed. It's tedious, as you need to enter each IP individually, and I have to regularly search. So I'm trying to write an application that will take a list of IPs, search, and create a report.

Unfortunately I'm stuck just trying to get it to work with the values already set...


I'm using ClientHttpRequest to post, and here is the relevant code:




And I get the output of:

java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c
java.io.BufferedReader@42719c


Anyone see the problem? Thanks in advance.

[ July 17, 2005: Message edited by: Rami Abusabi ]
[ July 17, 2005: Message edited by: Rami Abusabi ]
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you say

What is b exactly? What type is it? And what are you expecting to get when you print it?
 
Rami Abusabi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b is the BufferedReader wrapping the InputStream (which in turn is getting its stream from post() in ClientHttpRequest).

I'm working on the assumption that post() returns the html of whatever the result of the POST is. I had planned on then parsing that to determine whether there was a hit on any given IP. So before I had gotten to that point, I was printing to screen to verify that that is actually what I was getting.

I'm also a bit new at this, and while I've read a ton this is the first time I'm putting it to practical use. So my terminology/methodology is probably off.
 
Rami Abusabi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh man...


That should have been System.out.println(inputline);


After I read my own response I thought "that doesn't make sense", changed it, and it worked

Thanks for pointing it out!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!