<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6114596108399654074</id><updated>2011-11-27T15:48:34.444-08:00</updated><title type='text'>Cool Stuff</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ashok-cooldude.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6114596108399654074/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ashok-cooldude.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ashok Kumar P S</name><uri>http://www.blogger.com/profile/16676280686059736785</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6114596108399654074.post-8586193273844475465</id><published>2009-03-16T06:52:00.001-07:00</published><updated>2009-03-16T07:21:03.524-07:00</updated><title type='text'>Self Projects</title><content type='html'>Hey Hey... :)  I've started creating open source products/projects. Find some useful items here, that can be used in day-to-day development/end-user life.&lt;br /&gt;&lt;br /&gt;1) &lt;a href="http://sites.google.com/site/psashoknow/Home"&gt;Open In Explorer - An Eclipse Plugin&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114596108399654074-8586193273844475465?l=ashok-cooldude.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashok-cooldude.blogspot.com/feeds/8586193273844475465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6114596108399654074&amp;postID=8586193273844475465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6114596108399654074/posts/default/8586193273844475465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6114596108399654074/posts/default/8586193273844475465'/><link rel='alternate' type='text/html' href='http://ashok-cooldude.blogspot.com/2009/03/self-projects.html' title='Self Projects'/><author><name>Ashok Kumar P S</name><uri>http://www.blogger.com/profile/16676280686059736785</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6114596108399654074.post-8121590242699629596</id><published>2008-09-24T23:27:00.001-07:00</published><updated>2008-09-25T04:53:11.750-07:00</updated><title type='text'>Java Code Snippets</title><content type='html'>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style=";font-family:times new roman;font-size:130%;"  &gt;Hey! I created this blog to share some java code snippets with you. They all seem to be basic, but i hope these snippets can help your day to day programming.     &lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:times new roman;font-size:130%;"  &gt;Encoding a String:&lt;/span&gt; &lt;/div&gt;  &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;/div&gt;  &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;   &lt;pre   style="border-style: none; margin: 0em; padding: 0px; overflow: visible; width: 100.71%; color: black; line-height: 12pt; height: 130px; background-color: rgb(244, 244, 244);font-family:consolas,'Courier New',courier,monospace;font-size:8pt;"&gt;Charset charset = Charset.forName(&lt;span style="color: rgb(0, 96, 128);"&gt;"UTF-32"&lt;/span&gt;);&lt;br /&gt;String text = &lt;span style="color: rgb(0, 96, 128);"&gt;"Hello"&lt;/span&gt;;&lt;br /&gt;ByteBuffer encoded = charset.newEncoder().encode(CharBuffer.&lt;br /&gt;   wrap(text));&lt;br /&gt;System.&lt;span style="color: rgb(0, 0, 255);"&gt;out&lt;/span&gt;.println(&lt;span style="color: rgb(0, 96, 128);"&gt;"Encoded: "&lt;/span&gt; + &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; String(encoded.array()));&lt;br /&gt;CharBuffer decoded = charset.newDecoder().decode(encoded);&lt;br /&gt;System.&lt;span style="color: rgb(0, 0, 255);"&gt;out&lt;/span&gt;.println(&lt;span style="color: rgb(0, 96, 128);"&gt;"Decoded: "&lt;/span&gt; : " + &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; String(decoded.array()));&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:times new roman;font-size:130%;"  &gt;Reading/writing contents from/to a file with encoding:&lt;/span&gt;&lt;/div&gt;&lt;br /&gt; &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;pre   style="border-style: none; margin: 0em; padding: 0px; overflow: visible; width: 107.88%; color: black; line-height: 12pt; height: 150px; background-color: rgb(244, 244, 244);font-family:consolas,'Courier New',courier,monospace;font-size:8pt;"&gt;BufferedWriter writer = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; BufferedWriter(&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; OutputStreamWriter(&lt;br /&gt;   &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; FileOutputStream(&lt;span style="color: rgb(0, 96, 128);"&gt;"EncodingTest.txt"&lt;/span&gt;), &lt;span style="color: rgb(0, 96, 128);"&gt;"UTF-32"&lt;/span&gt;));&lt;br /&gt;writer.write(&lt;span style="color: rgb(0, 96, 128);"&gt;"I'm here to help you for reading/writing "&lt;/span&gt; +&lt;br /&gt;   &lt;span style="color: rgb(0, 96, 128);"&gt;"contents from/to a file with encoding"&lt;/span&gt;);&lt;br /&gt;writer.close();&lt;br /&gt;BufferedReader reader = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; BufferedReader(&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; InputStreamReader(&lt;br /&gt;   &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; FileInputStream(&lt;span style="color: rgb(0, 96, 128);"&gt;"EncodingTest.txt"&lt;/span&gt;), &lt;span style="color: rgb(0, 96, 128);"&gt;"UTF-32"&lt;/span&gt;));&lt;br /&gt;System.&lt;span style="color: rgb(0, 0, 255);"&gt;out&lt;/span&gt;.println(reader.readLine());&lt;br /&gt;reader.close();&lt;/pre&gt;&lt;br /&gt;For more available character sets available in java ask "Charset.availableCharsets()".&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;span style=";font-family:times new roman;font-size:130%;"  &gt;&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;br /&gt;   &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d1062383-53f9-41bb-bafd-c7db3277411b" style="margin: 0px; padding: 0px; display: inline;"&gt;del.icio.us Tags: &lt;a href="http://del.icio.us/popular/Encoding" rel="tag"&gt;Encoding&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/Java" rel="tag"&gt;Java&lt;/a&gt;,&lt;a href="http://del.icio.us/popular/UTF-32" rel="tag"&gt;UTF-32&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114596108399654074-8121590242699629596?l=ashok-cooldude.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ashok-cooldude.blogspot.com/feeds/8121590242699629596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6114596108399654074&amp;postID=8121590242699629596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6114596108399654074/posts/default/8121590242699629596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6114596108399654074/posts/default/8121590242699629596'/><link rel='alternate' type='text/html' href='http://ashok-cooldude.blogspot.com/2008/09/java-code-snippets_24.html' title='Java Code Snippets'/><author><name>Ashok Kumar P S</name><uri>http://www.blogger.com/profile/04393069381342644941</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
