• Post Reply Bookmark Topic Watch Topic
  • New Topic

Returning data from an array  RSS feed

 
Thomas Smithers
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

So what im trying to do is, reading data from the bufferedReader into an array, then return that arrays data back.. here is the code...



So as you can see at the end i'm return the Array, but i get this error



Anyone know what i'm doing wrong here....??
 
Thomas Smithers
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohh boy.... i got it.... don't i feel stupid now.... :P

Just for anyone else curious, i was returning an ArrayList, but the i had defined on the method that i was returning a String. So had to change that to ArrayList.... Not sure why i didn't catch that earlier.


EDIT:

Ok so i have a question here... As you can see what i was doing here was running an RMI Server/client. This was some code from the server side and it was returning it to the client. But i noticed on the client side that the text was in bad formatting since it was in an array. My question is, is there an easier way to grab the text from the UNIX box and send it back to the client....?? Or do i have to place it into an array and return it back?

Thanks.
 
Jon Benedetto
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my 5 years of programming with java, I never found an easier way to do it. There is only two ways I know how to get data and the array would be the quickest.
 
Thomas Smithers
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the other way if i can ask?

The array works fine but for example when i get the cpu usage this is how it looks on the client side...



As you see the formatting is messed up....
it should be like this...



Is there a way to fix this??

Thanks

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!