Forums Register Login

InputStream

+Pie Number of slices to send: Send
Hi all,

Can someone here give me an example of how to create a method that takes an InputStream as an parameter, reads the stream and returns the number of characters it contains as an int?

It could be a actual Java code ot a pseudo code.

I just need something to start me off with a method i'm creating.

Thanks.
+Pie Number of slices to send: Send
Check out http://faq.javaranch.com/java/ReadDoesntDoWhatYouThinkItDoes
The second piece of code should be able to help you out.
+Pie Number of slices to send: Send
 

Rob Prime wrote:Check out http://faq.javaranch.com/java/ReadDoesntDoWhatYouThinkItDoes
The second piece of code should be able to help you out.


Thanks my friend.
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 832 times.
Similar Threads
unable to insert a photo document in to the oracle database through JDBC
servlets and xml
Problem loading Properties file
convert from string to inputstream
getting the value of .properties file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:39:41.