Well, the API can be a bit confusing. At least it was for me when I first started. Anytime you see something like:
StringBuffer(String arg)
Or the like that means that there is a StringBuffer constructor that takes a String as an argument. So in your code:
sb = new StringBuffer(String buff);
The problem is 2 fold
1. if buff was a String you would simply say:
sb = new StringBuffer(buff);
2. But buff is a BufferedInputStream and a StringBuffer won't accept that as an argument.
I am not sure if you are leaving part of your code out on purpose or if what you provided is all you have, but you still have a lot of work to do.
Look at the following:
Hopefully that will get you going. For future reference, when you are having code problems post at the least majority of the code you are having a problem with, because where you think the problem is could be that something else we don't see is causing it. Also, post "exact" compile/error messages. That way we know what errors we are dealing with versus: "I got errors..."
Let me know how it goes....
