Java

Copy the content of an input stream to an output stream

Posted by on 2012/03/18 at 12:49 am

How to copy the content of an input stream to an output stream

FacebookGoogle BookmarksTwitterFriendFeedGoogle GmailBlogger PostGoogle ReaderHotmailWordPressShare

Closing streams like a boss

Posted by on 2012/03/15 at 12:48 am

This is one of my favorite tips and I also consider it a good practice. How to close any java input or output Stream.

FacebookGoogle BookmarksTwitterFriendFeedGoogle GmailBlogger PostGoogle ReaderHotmailWordPressShare

How to sort RSS by date

Posted by on 2011/12/10 at 8:39 pm

So, if you’ve got one or more RSS feeds and you want to sort them according to the pubdate, do this:

FacebookGoogle BookmarksTwitterFriendFeedGoogle GmailBlogger PostGoogle ReaderHotmailWordPressShare

AppEngine deploy problem with gmail account

Posted by on 2011/06/22 at 11:22 am

The Google plugin for eclipse is connected with my personal gmail account. I created a new gmail account to link it with a AppEngine application. After developing part of the application I tried to deploy it and faced this problem: Unable to update: java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=****&version=1& 404 Not FoundThis application does not [...]

FacebookGoogle BookmarksTwitterFriendFeedGoogle GmailBlogger PostGoogle ReaderHotmailWordPressShare

Convert HTML special characters to normal text

Posted by on 2011/05/09 at 5:13 pm

Apache commons is once again the answer on “how to convert HTML special characters to normal text”. Just include the commons-lang jar in your project and use only one line of code: System.out.println(StringEscapeUtils.unescapeHtml3(“special chars here”)); Commons Lang The standard Java libraries fail to provide enough methods for manipulation of its core classes. Apache Commons Lang [...]

FacebookGoogle BookmarksTwitterFriendFeedGoogle GmailBlogger PostGoogle ReaderHotmailWordPressShare