And PHP is a Web development framework
This would explain...why Zend is now...developing a framework. You either are saying something stupid or using the phrase "web development framework" very loosely.
Code:
while ((line = reader.readLine()) != null) {
contents += line;
}
This is inefficent....do this:
Code:
StringBuilder builder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
Note: If you are using java < 1.5 you have to use "StringBuffer". Also you could do it faster in Java by not using the BufferedReader and just dealing with the InputStream directly, but that would involve writing a few helper methods.
Bookmarks