<?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:blogger='http://schemas.google.com/blogger/2008' 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-6536551626514470628</id><updated>2024-09-01T01:39:26.178-07:00</updated><category term="Financial"/><category term="Android"/><category term="Java Swings"/><category term="J2ME"/><title type='text'>Write Program</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-3348433528080681675</id><published>2010-07-15T20:57:00.000-07:00</published><updated>2010-07-15T20:57:15.184-07:00</updated><title type='text'>How to write Extension for Google Chrome web browser?</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyoj3DaTEkdUIVWj44neVNn63yX2ayoagJnQVHxXMebTZEmqkNbBK1aX3LhrGyLTJAn1wIDFfkT59Ok-lIXCI1DJciSVCGzouMpcjHcwLwcBWxBTwsYC0lL4WEQXvZX8x4Q1SmZgyFOk_w/s1600/chrome_extension.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyoj3DaTEkdUIVWj44neVNn63yX2ayoagJnQVHxXMebTZEmqkNbBK1aX3LhrGyLTJAn1wIDFfkT59Ok-lIXCI1DJciSVCGzouMpcjHcwLwcBWxBTwsYC0lL4WEQXvZX8x4Q1SmZgyFOk_w/s320/chrome_extension.png&quot; /&gt;&lt;/a&gt;Recently Google Chrome web browser is getting popular with many&amp;nbsp;features like simple,fast and secured browsing compared to other browsers. Chrome gives us the option to&amp;nbsp;customize their browser by writing extensions,theams. They have a simple way to write your own extension with the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--&lt;/p&gt;
&lt;p&gt;

google_ad_client = &quot;pub-7965587014035488&quot;;&lt;/p&gt;&lt;p&gt;

/* 728x15, created 7/7/10 */&lt;/p&gt;&lt;p&gt;

google_ad_slot = &quot;2330881672&quot;;&lt;/p&gt;&lt;p&gt;

google_ad_width = 580;&lt;/p&gt;&lt;p&gt;

google_ad_height = 15;&lt;/p&gt;&lt;p&gt;

//--&gt;&lt;/p&gt;&lt;p&gt;


&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;/p&gt;&lt;p&gt;

src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;&lt;/p&gt;&lt;p&gt;


&lt;/script&gt;&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create manifest.json&lt;/li&gt;
&lt;li&gt;Create an icon for extension&lt;/li&gt;
&lt;li&gt;Create a HTML file to display when the extension is clicked&lt;/li&gt;
&lt;li&gt;Load the extension into Browser&lt;/li&gt;
&lt;/ul&gt;every extension of chrome browser should contain a manifest file, which provides some import information to the browser like extension name , version, permissions, icon.&lt;br /&gt;
Example manifest file:&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&quot;name&quot;: &quot;My Extension&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&quot;version&quot;: &quot;1.0&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&quot;description&quot;: &quot;Here the description about your extension&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&quot;browser_action&quot;: {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;default_icon&quot;: &quot;extension_icon.png&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;popup&quot;: &quot;popup.html&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;},&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&quot;permissions&quot;: [&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;tabs&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&quot;bookmarks&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;]&lt;br /&gt;
}&lt;br /&gt;
As next step create an icon that will be displayed in the browser toolbar. The optimal size of the icon is 16x16 pixels.The supported image formats are PNG,JPEG,GIF,ICO,BMP.&lt;br /&gt;
&lt;br /&gt;
Now create a HTML page which will be displayed when the extension icon is clicked from the browser. The HTML file shall contain CSS,Javascript also to represent the page.&lt;br /&gt;
Example HTML file:&lt;br /&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
body {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;min-width:400px;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;overflow-x:hidden;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;&amp;nbsp;Hello World! &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkMfTnOSXriGkFTMtfYAufHvthAdat3cA-GBxeRRxB0yTNt-tlGcDyo8FHjFuUwpK94KLMDAtG_IMyDXWXimGJSAlCjNvZuINNwRjOBWXkzXSJMGaN5PUr3gFf0cmJnZaEZIgCTP2vzXuT/s1600/extensions_menuitem.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkMfTnOSXriGkFTMtfYAufHvthAdat3cA-GBxeRRxB0yTNt-tlGcDyo8FHjFuUwpK94KLMDAtG_IMyDXWXimGJSAlCjNvZuINNwRjOBWXkzXSJMGaN5PUr3gFf0cmJnZaEZIgCTP2vzXuT/s320/extensions_menuitem.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Now the coding part is complete you have to load this extension into the browser. To load the extension click on the extensions menuitem from the configure toolbar item. It will display the extensions page with list of extensions already loaded. Click on the developer mode link will show the &quot;load unpacked extension&quot; button. Click on this button and browse to the folder where all your files are stored. Now your extension will be loaded into the browser and the icon will be displayed in the toolbar.</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/3348433528080681675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/07/how-to-write-extension-for-google.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3348433528080681675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3348433528080681675'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/07/how-to-write-extension-for-google.html' title='How to write Extension for Google Chrome web browser?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyoj3DaTEkdUIVWj44neVNn63yX2ayoagJnQVHxXMebTZEmqkNbBK1aX3LhrGyLTJAn1wIDFfkT59Ok-lIXCI1DJciSVCGzouMpcjHcwLwcBWxBTwsYC0lL4WEQXvZX8x4Q1SmZgyFOk_w/s72-c/chrome_extension.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-4249100971400591062</id><published>2010-07-07T23:08:00.000-07:00</published><updated>2010-07-07T23:50:11.635-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2ME"/><title type='text'>J2ME program to capture a picture through mobile phone</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;Here is a simple J2ME program to take a snapshot using the camera of the mobile phone.This program display the camera and allow the user to capture the image and store the picture in the specific location. Import the respective&amp;nbsp;packages&amp;nbsp;after copying the following code.&lt;/span&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;pub-7965587014035488&quot;;
/* 728x15, created 7/7/10 */
google_ad_slot = &quot;2330881672&quot;;
google_ad_width = 580;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #7f0055; font-family: &#39;Courier New&#39;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class CameraMIDlet extends MIDlet&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;implements CommandListener, Runnable {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private Display mDisplay;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private Form mMainScreen;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private Item mVideoItem;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private VideoControl mVidc;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private Command mCaptureCommand;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private Player mPlayer = null;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private boolean mEndNow = false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private FileConnection fileCon = null;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public void startApp()&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mDisplay = Display.getDisplay(this);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (mMainScreen == null) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;System.out.println(&quot;File Version:&quot;+System.getProperty(&quot;microedition.io.file.FileConnection.version&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mMainScreen = new Form(&quot;My Camera&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mMainScreen.addCommand(new Command(&quot;Exit&quot;, Command.EXIT, 0));&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mCaptureCommand = new Command(&quot;Capture&quot;, Command.SCREEN, 0);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mMainScreen.addCommand(mCaptureCommand);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mMainScreen.setCommandListener(this);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mDisplay.setCurrent(mMainScreen);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Thread t = new Thread(this);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;t.start();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mEndNow = false;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public void pauseApp() {}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public void destroyApp(boolean unconditional)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (mPlayer != null)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mPlayer.close();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mEndNow = true;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;synchronized(this)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;this.notify();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public void commandAction(Command c, Displayable s) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (c.getCommandType() == Command.EXIT) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;destroyApp(true);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;notifyDestroyed();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// Capture&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;synchronized(this) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;this.notify();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public void run()&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;viewCamera();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;while(!mEndNow)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;synchronized(this)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;try {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;this.wait();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;} catch (InterruptedException ex) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// Ignore&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if (!mEndNow)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;try&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;byte[] rawImg = mVidc.getSnapshot(null);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;int counter = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;while(true)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;counter ++;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String filename = &quot;file:///C:/Pictures/Snap&quot;+counter+&quot;.png&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fileCon = (FileConnection) Connector.open(filename);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if(fileCon.exists())&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;continue;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fileCon.create();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;break;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;OutputStream out = fileCon.openOutputStream();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.write(rawImg);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;out.close();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fileCon.close();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;} catch (MediaException ex) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;continue;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;catch (Exception e)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;     &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;showException(e);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private void viewCamera() {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;try&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mPlayer = Manager.createPlayer(&quot;capture://video&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mPlayer.realize();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if ((mVidc = (VideoControl)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mPlayer.getControl(&quot;VideoControl&quot;)) != null)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mVideoItem = (Item)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mVidc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mMainScreen.append(mVideoItem);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mPlayer.start();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mDisplay.setCurrent(mMainScreen);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;catch (Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;showException(e);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;return;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private void showException(Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Alert a = new Alert(&quot;Exception&quot;, e.toString(), null, null);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;a.setTimeout(Alert.FOREVER);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mDisplay.setCurrent(a, mMainScreen);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/4249100971400591062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/07/j2me-program-to-capture-picture-through.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4249100971400591062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4249100971400591062'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/07/j2me-program-to-capture-picture-through.html' title='J2ME program to capture a picture through mobile phone'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-4429435406751550923</id><published>2010-07-06T07:13:00.000-07:00</published><updated>2010-07-06T20:12:33.118-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2ME"/><title type='text'>J2ME program to search for Bluetooth Devices through Mobile Phone</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYJv_5iiqjt0DeSwXBiwHYQZ5_pJhKDuPKD_dqMBPf5evWhoFiolI8Xgm4MuV6Py4su25tDTX8p18UhVfrbtJpAWzcsOcCwfaZLLEZhAEqmnvUuyAhlg_5MQ8ruvEMrAoNsCqAdcLjx313/s1600/bluetooth_logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYJv_5iiqjt0DeSwXBiwHYQZ5_pJhKDuPKD_dqMBPf5evWhoFiolI8Xgm4MuV6Py4su25tDTX8p18UhVfrbtJpAWzcsOcCwfaZLLEZhAEqmnvUuyAhlg_5MQ8ruvEMrAoNsCqAdcLjx313/s320/bluetooth_logo.jpg&quot; /&gt;&lt;/a&gt;&lt;span xmlns=&quot;&quot;&gt;Here we will discuss about a sample program to search for Bluetooth enabled devices around your mobile phone. J2ME community has defined a standard for Bluetooth communication in JSR 82, which describes the standard APIs used to communicate with Bluetooth enabled devices. The JSR 82 contains the following packages to exchange data between two devices.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;ul&gt;&lt;li&gt;javax.bluetooth – Core Bluetooth API&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;javax.obex         -- APIs for Object Exchange (OBEX) protocol&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Most of the below code is self explanatory. The actual scanning is started when the discoveryAgent.startInquery() method is called. So, Whenever a new device is found then deviceDiscovered() method will be invoked and once the discovery process is complete then inquiryCompleted() method is called.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class MyBluetoothMIDlet extends MIDlet implements CommandListener,DiscoveryListener {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Form mainForm = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Command exitCmd = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Command doneCmd = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Command discoverCmd = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Display display = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;List deviceList = null;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void startApp()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display = Display.getDisplay(this);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainForm = new Form(&quot;Bluetooth App&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;deviceList = new List(&quot;Devices Found&quot;,List.IMPLICIT);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exitCmd = new Command(&quot;Exit&quot;,Command.EXIT,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;discoverCmd = new Command(&quot;Search&quot;,Command.SCREEN,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainForm.setCommandListener(this);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainForm.addCommand(exitCmd);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainForm.addCommand(discoverCmd);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doneCmd = new Command(&quot;Done&quot;,Command.EXIT,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;deviceList.addCommand(doneCmd);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;deviceList.setCommandListener(this);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;StringItem item = new StringItem(&quot;Bluetooth Version:&quot;,LocalDevice.getProperty(&quot;bluetooth.api.version&quot;));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mainForm.append(item); &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display.setCurrent(mainForm);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void pauseApp()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void destroyApp(boolean flag)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Exited App&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void commandAction(Command c, Displayable d)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (c.getCommandType() == Command.EXIT)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;destroyApp(true);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;notifyDestroyed();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DiscoveryAgent discoverAgent = LocalDevice.getLocalDevice().getDiscoveryAgent();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;discoverAgent.startInquiry(DiscoveryAgent.GIAC, this);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display = Display.getDisplay(this);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display.setCurrent(deviceList);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch(Exception ex)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ex.printStackTrace();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void serviceSearchCompleted(int a, int b)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void deviceDiscovered(RemoteDevice remoteDevice, DeviceClass dev)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String btAddress = remoteDevice.getBluetoothAddress();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String fName = remoteDevice.getFriendlyName(true);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Bluetooth Address:&quot;+btAddress);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Friendly Name:&quot;+fName);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String msg = &quot;&quot;;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(fName==null || fName.equals(&quot;&quot;))&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = btAddress;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = fName;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;deviceList.append(msg, null);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch(Exception e)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e.printStackTrace();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void inquiryCompleted(int type)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Alert alert = new Alert(&quot;Information&quot;,&quot;Scan Completed!&quot;,null,null);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display.setCurrent(alert, deviceList);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Enquiry Completed.&quot;+type);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void servicesDiscovered(int c, ServiceRecord servRec[])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{ &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/4429435406751550923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/07/j2me-program-to-search-for-bluetooth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4429435406751550923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4429435406751550923'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/07/j2me-program-to-search-for-bluetooth.html' title='J2ME program to search for Bluetooth Devices through Mobile Phone'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYJv_5iiqjt0DeSwXBiwHYQZ5_pJhKDuPKD_dqMBPf5evWhoFiolI8Xgm4MuV6Py4su25tDTX8p18UhVfrbtJpAWzcsOcCwfaZLLEZhAEqmnvUuyAhlg_5MQ8ruvEMrAoNsCqAdcLjx313/s72-c/bluetooth_logo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-544464522811717298</id><published>2010-07-05T21:32:00.000-07:00</published><updated>2010-07-05T21:36:52.848-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Program to make a phone call in Android Phone</title><content type='html'>&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkqjzqGelAPbPjC2mezex_VEhZIDyhTEp4J1Px4Ua3b_8xQ18ZmpIA8PFLPKXyoe8oEZVf5OfXw3H4mNPHbbL3UK-cOb7OwFGmifVvrz5zpoGU3TUt_dVEcpYlYXktXqNRGPRFGahp-A6Z/s1600/android.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; cssfloat: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; rw=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkqjzqGelAPbPjC2mezex_VEhZIDyhTEp4J1Px4Ua3b_8xQ18ZmpIA8PFLPKXyoe8oEZVf5OfXw3H4mNPHbbL3UK-cOb7OwFGmifVvrz5zpoGU3TUt_dVEcpYlYXktXqNRGPRFGahp-A6Z/s320/android.jpg&quot; /&gt;&lt;/a&gt;Android by default includes and application called PhoneApp, which actially includes the functions of mobile phone. Intent is an Android API wich actually communicates between different Anrdoid applications to&amp;nbsp;perform certain operations such as initializing a phone call. To enable your application to initialize&amp;nbsp;a phone call the following simple code will serve.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;private void makecall()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;try &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Intent phonecallIntent = new Intent(Intent.ACTION_CALL);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;callIntent.setData(Uri.parse(&quot;tel:9884179964&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;startActivity(phonecallIntent);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;catch (ActivityNotFoundException activityException) &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Log.e(&quot;makeCallDemo&quot;, &quot;Call failed&quot;, activityException);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
So, in the above example the instance of Intent class will actually search for the application which provides ACTION_CALL action in this case PhoneApp and tell the android system that we want to start a phone call. The startActivity method will actually initiate the phone call to the provided number. The phone number provided above should follow the E.164 Number format.</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/544464522811717298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/07/program-to-make-phone-call-in-android.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/544464522811717298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/544464522811717298'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/07/program-to-make-phone-call-in-android.html' title='Program to make a phone call in Android Phone'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkqjzqGelAPbPjC2mezex_VEhZIDyhTEp4J1Px4Ua3b_8xQ18ZmpIA8PFLPKXyoe8oEZVf5OfXw3H4mNPHbbL3UK-cOb7OwFGmifVvrz5zpoGU3TUt_dVEcpYlYXktXqNRGPRFGahp-A6Z/s72-c/android.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-6094189669178346765</id><published>2010-07-05T20:29:00.000-07:00</published><updated>2010-07-05T20:31:04.181-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Database used in Android OS</title><content type='html'>&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQpzxQvr7T59aetHVWLELZ_uzzJKx2Kl5AfZmmPLEUNsF-CDpjesTyuK7XRQZlu5_h0pSXFm-V4Yen9IqfMGtW1kaDKKr7WBiGdAw5xE74A3JLuzOtDb5LD-21eJVPOv762P2koydgM5V9/s1600/sqlite.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; cssfloat: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;60&quot; rw=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQpzxQvr7T59aetHVWLELZ_uzzJKx2Kl5AfZmmPLEUNsF-CDpjesTyuK7XRQZlu5_h0pSXFm-V4Yen9IqfMGtW1kaDKKr7WBiGdAw5xE74A3JLuzOtDb5LD-21eJVPOv762P2koydgM5V9/s200/sqlite.PNG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;Android apps use SQLite relational database to store information like contacts, events, tasks and application specific data. SQLite database engine&amp;nbsp;is a self-contained transactional database engine that requires no seperate database server process. SQLite is an opensource database actively developed by a large set of community and sponsers like Oracle, Symbian, Mozilla, Adobe, Bloomberg.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;Some of the well-known&amp;nbsp;users of SQLite DB&amp;nbsp;are:&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;Apple&lt;/li&gt;

&lt;ul&gt;&lt;li style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;IPhone&lt;/li&gt;
&lt;li style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;&amp;nbsp;IPod touch&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;ITunes software&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li style=&quot;border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;&quot;&gt;Google &lt;/li&gt;

&lt;ul&gt;&lt;li&gt;Android OS&lt;/li&gt;
&lt;li&gt;Google Gears&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Crome Web&amp;nbsp;Browser&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;In SQLite, the database is a simple disk file and all the data structures of relational database like tables, indexes, views are with in this file.</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/6094189669178346765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/07/database-used-in-android-os.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/6094189669178346765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/6094189669178346765'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/07/database-used-in-android-os.html' title='Database used in Android OS'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQpzxQvr7T59aetHVWLELZ_uzzJKx2Kl5AfZmmPLEUNsF-CDpjesTyuK7XRQZlu5_h0pSXFm-V4Yen9IqfMGtW1kaDKKr7WBiGdAw5xE74A3JLuzOtDb5LD-21eJVPOv762P2koydgM5V9/s72-c/sqlite.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-5141496411888235384</id><published>2010-06-23T08:17:00.000-07:00</published><updated>2010-06-23T08:20:27.054-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>What are Differences between J2ME and Android?</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;Nowadays mobile phones are not just for making calls. It has become a handy computer with which you can be always connected to the world (i.e Internet). As the usage of mobile phones increased drastically so the applications for the mobiles are also increasing with the same pace. Earlier writing mobile applications was difficult and was dependent on phone hardware. With the introduction of J2ME the platform independence has come into picture. Which means that a mobile application can run on all the phones in spite of the vendors (like Nokia, Motorola..).  The major lacking in the J2ME is that not able to access the low level (Operating System) feature of the mobile phone. The J2ME has got limited access to the mobiles and hence the applications will also be limited.&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;br /&gt;
Android is an OS built with Linux kernel and Java platform. We will see the primary differences between J2ME and Android.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;table border=&quot;0&quot; style=&quot;border-collapse: collapse;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 319px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 319px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: solid black 0.5pt; padding-left: 7px; padding-right: 7px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;J2ME&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: solid black 0.5pt; padding-left: 7px; padding-right: 7px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;Android&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Platform like J2SE to development J2ME apps&lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Operating System with customized Java API to develop mobile apps&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Kilobyte Virtual Machine (KVM)&lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Dalvik Virtual Machine (DVM)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Limited access to the native OS&lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Full access to the native OS&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Limited GUI components&lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Many more and complex GUI components&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: solid black 0.5pt; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Not easy to integrate with 3&lt;sup&gt;rd&lt;/sup&gt; party applications &lt;/td&gt;&lt;td style=&quot;border-bottom: solid black 0.5pt; border-left: none; border-right: solid black 0.5pt; border-top: none; padding-left: 7px; padding-right: 7px;&quot;&gt;Has easy integration to Google&#39;s cloud services (GTalk, Maps, Gmail…)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/5141496411888235384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/what-are-differences-between-j2me-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5141496411888235384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5141496411888235384'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/what-are-differences-between-j2me-and.html' title='What are Differences between J2ME and Android?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-3724048639279589811</id><published>2010-06-20T20:58:00.001-07:00</published><updated>2010-06-21T01:32:43.962-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Financial"/><title type='text'>Systematic Investment Plan (SIP)</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;One way or the other way you want to earn money with some initial capital. There are many ways to invest the money with different levels of risk. One such thing is stock market, when you hear of this you may be afraid thinking it is kind if gambling and it is very risky in investing in stock market. If you are not an expert in stock market analysis and still want to take the profit out of it, there are some one who will be constantly monitoring for you and investing wisely by doing the proper market analysis. &lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Those people are called fund managers who will be managing the Mutual Funds. Mutual fund is one type of investment in stock market with lesser risk compared to the equity market. In mutual funds the investment is done across different sectors to avoid the fluctuations in the market. Nowadays there a new concept called Systematic Investment Plan (SIP) in mutual funds. It is something like recurring deposit in   banks where in you deposit fixed amount of money every month.SIP something like this where you invest regularly into the mutual funds and aggregate the profits in volatile market conditions. SIP is helpful if you are not able to invest huge amount at once and want to invest small amount regularly. In Daily SIP you can invest as minimum as Rs: 10/- per day.  You can register for SIP through online using your Demat Account. &lt;br /&gt;
&lt;br /&gt;
Here are the few MF companies providing Daily SIP.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;margin-left: 72pt;&quot;&gt;&lt;li&gt;IDFC MF&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Fidelity MF&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;L &amp;amp; T MF&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Bharati AXA&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Sahara AXA&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/3724048639279589811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/systematic-invest-plan-sip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3724048639279589811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3724048639279589811'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/systematic-invest-plan-sip.html' title='Systematic Investment Plan (SIP)'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-7764033955886533880</id><published>2010-06-17T22:00:00.000-07:00</published><updated>2010-06-17T22:05:08.787-07:00</updated><title type='text'>Can NRIs open Bank Account in India?</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;Yes, Non-Resident Indians (NRI) or Person of Indian Origin (POI) are allowed to maintain a bank account in India.&lt;br /&gt;
The following are the type of accounts for NRI/POIs.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;ul&gt;&lt;li&gt;Non-Resident (Ordinary) Rupee Account&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  - NRO Account&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Non-Resident (External) Rupee Account&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  - NRE Account&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Foreign Currency Non-Resident (Bank) Account  - FCNR (B) Account &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;table border=&quot;0&quot; style=&quot;border-collapse: collapse;&quot;&gt;&lt;colgroup&gt;&lt;col style=&quot;width: 226px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 151px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 145px;&quot;&gt;&lt;/col&gt;&lt;col style=&quot;width: 151px;&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: outset 0.75pt; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;Particulars&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: outset 0.75pt; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;FCNR (B) Account&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: outset 0.75pt; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;NRE Account&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: outset 0.75pt; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;strong&gt;NRO Account&lt;/strong&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Joint account of two or more NRIs&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Permitted&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Joint account with another person resident in India&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Not permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Not permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Permitted&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Currency in which account is denominated&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Pound Sterling/ US Dollar/Jap.Yen/Euro&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Indian Rupees&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Indian Rupees&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Repatriability –&lt;br /&gt;
Principal&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Freely repatriable&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Freely repatriable&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Not repatriable&lt;br /&gt;
&lt;br /&gt;
(except current income like rent, dividend, pension etc. and remittances indicated under &quot;Repatriation of NRO Funds&quot;)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Interest&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Freely repatriable&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Freely repatriable&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Freely repatriable&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Foreign currency risk&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Account holder is protected against changes in INR value vis-à-vis the currency in which the account is denominated.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Account holder is exposed to the fluctuations in the value of INR.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Account holder is exposed to the fluctuations, in the value of INR to the extent of interest amount.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Type of accounts&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Term deposits only.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Current, Savings, Recurring, Fixed Deposits.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Current, Savings, Recurring, Fixed Deposits.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Period of fixed deposits&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;For terms not less than 1 year and not exceeding 3 years&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;For the periods as announced by the deposit taking bank.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;For the periods as announced by the deposit taking bank.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Rate of interest&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Banks are free to determine interest rates within the ceiling, if any, prescribed by the Reserve Bank&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Banks are free to determine interest rates.&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Banks are free to determine interest rates.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Rupee Loans in India against Security of the funds held in the account to :&lt;br /&gt;
Account holder&lt;br /&gt;
Third Party&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Permitted&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;height: 91px;&quot;&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: outset 0.75pt; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;Foreign currency loans outside India against security of the funds held in the account to :&lt;br /&gt;
Account holder&lt;br /&gt;
Third Party&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Permitted&lt;/td&gt;&lt;td style=&quot;border-bottom: outset 0.75pt; border-left: none; border-right: outset 0.75pt; border-top: none; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not permitted&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;em&gt;Source: RBI&lt;/em&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/7764033955886533880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/can-nris-open-bank-account-in-india.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/7764033955886533880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/7764033955886533880'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/can-nris-open-bank-account-in-india.html' title='Can NRIs open Bank Account in India?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-9005882069719886269</id><published>2010-06-14T21:19:00.001-07:00</published><updated>2010-06-14T21:38:57.334-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Financial"/><title type='text'>How to get my Credit Rating in India?</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Government of India and Reserve Bank of India (RBI) together established Credit Rating System called CIBIL (Credit Information Bureau (India) Limited) in the year 2000. The basic functioning of this corporation is that it maintains the credit rating of the Consumer barrowers and Commercial barrowers. The advantage of this for the banks is that, before issuing any kind of loans to the individuals the banks shall verify the currently running debts for the individuals or the commercial firms.&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Individuals can also get their credit rating by requesting to the CIBIL to get clear picture before applying for Housing, Automobile and Personal loans.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The following information is maintained by the CIBIL about the individuals/ commercials.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;margin-left: 72pt;&quot;&gt;&lt;li&gt;Name&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Address&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;In case of individuals:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Identification numbers&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Passport ID&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Voters ID&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;Date of birth&amp;nbsp;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;In case of non-individuals&lt;/div&gt;&lt;ul&gt;&lt;li&gt;D-U-N-S® Number&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Registration Number&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Legal Constitution&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Records of all the credit facilities availed by the borrower&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Past payment history&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Amount overdue&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Number of inquiries made on that borrower, by different Members&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Suit-filed status.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;The Credit Information Report (CIR) shall be obtained by requesting to the CIBIL by following the procedure below.&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;margin-left: 72pt;&quot;&gt;&lt;li&gt;Fill the CIR request form. Click &lt;a href=&quot;https://www.cibil.com/pdf/Consumer_Disclosure_Form.pdf&quot;&gt;here&lt;/a&gt; to download the form.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;The following documents are to be sent with self-attestation.&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Copy of ID proof (PAN/Passport/Voter ID) &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Copy of Latest Address Proof (Bank a/c statement/Electricity Bill/Telephone Bill) &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Fees (DD of Rs: 142/- in favor of &quot;&lt;strong&gt;Credit Information Bureau (India) Limited&lt;/strong&gt;&quot;).&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;The above documents shall be sent to the following addresses by speed post/ courier.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;By Speed Post&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;P.O. BOX 17,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Millennium Business Park,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Navi Mumbai – 400 710&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;div&gt;By Courier&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Credit Information Bureau (India) Limited.&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Hoechst House,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;6th Floor,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;193 Backbay Reclamation,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Nariman Point,&lt;/div&gt;&lt;div style=&quot;margin-left: 36pt;&quot;&gt;Mumbai - 400021&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/9005882069719886269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/how-to-get-my-credit-rating-in-india.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/9005882069719886269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/9005882069719886269'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/how-to-get-my-credit-rating-in-india.html' title='How to get my Credit Rating in India?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-4111535700771955159</id><published>2010-06-14T20:26:00.001-07:00</published><updated>2010-06-14T21:40:14.148-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Financial"/><title type='text'>List of Banks in India with RTGS facility</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;How do I transfer money instantly between differently banks in India?&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;There is a facility called Real Time Gross Settlement (RTGS) managed by Reserve Bank of India (RBI) with which the transfer of money is done in real time.  RTGS transfer is different from NEFT, using NEFT the transfer funds takes one business day where as in RTGS funds will be credited within seconds into the beneficiaries account. But the minimum limit to transfer funds using RTGS is Rs 100000/- and there is no upper limit for the RTGS transactions.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;To get the list of branches enabled with RTGS please click &lt;a href=&quot;http://docs.google.com/uc?id=0B2O8J8z3WsOLZGViYzI4MmYtZGY5ZC00OTM3LWE1OWItZDkyZWNlMDJkYjk3&amp;amp;export=download&amp;amp;hl=en&quot;&gt;here&lt;/a&gt;. This facility is applicable to the banks in India only. &lt;br /&gt;
&lt;br /&gt;
There is a service change of:&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;margin-left: 108pt;&quot;&gt;&lt;li&gt;Rs 25/- per transaction of 1 lakh to 5 lakhs.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Rs 50/- per transaction of 5 lakhs and above.&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;In case something goes wrong during the transaction, the respective branch shall be contacted. If still the issue is not solved then please communicate to the following address.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;The Chief General Manager,&lt;br /&gt;
&lt;br /&gt;
Reserve Bank of India,&lt;br /&gt;
&lt;br /&gt;
Customer Service Department,&lt;br /&gt;
&lt;br /&gt;
1st Floor, Amar Building, Fort,&lt;br /&gt;
&lt;br /&gt;
Mumbai – 400001.&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/4111535700771955159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/list-of-banks-in-india-with-rtgs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4111535700771955159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/4111535700771955159'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/list-of-banks-in-india-with-rtgs.html' title='List of Banks in India with RTGS facility'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-600507113167976571</id><published>2010-06-14T04:45:00.000-07:00</published><updated>2010-06-14T21:40:51.632-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Financial"/><title type='text'>List of Public and Private Sector Banks in India with NEFT facility</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;National Electronic Funds Transfer (NEFT) is a nationwide facility to transfer funds electronically between any two bank accounts (i.e inter bank funds transfer). As per Reserve Bank of India (RBI) there are 62,000 bank branches out of 75,000 that are enabled with NEFT facility. Maximum time taken to transfer the amount to the beneficiary account is one business day. NEFT facility is available between 9am and 5pm during weekdays and 9am to 12pm during Saturday and Sunday is holiday. This facility is applicable to transfers with in India. Please click&lt;strong&gt;&lt;br /&gt;
&lt;a href=&quot;http://docs.google.com/uc?id=0B2O8J8z3WsOLYmIzMGFhZmMtMzQwNC00NzAyLWJkMTYtYWM2OGJlYjJjZTE1&amp;amp;export=download&amp;amp;hl=en&quot;&gt;here &lt;/a&gt;&lt;/strong&gt;to get the list of branches with NEFT facility.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/600507113167976571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/06/list-of-public-and-private-sector-banks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/600507113167976571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/600507113167976571'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/06/list-of-public-and-private-sector-banks.html' title='List of Public and Private Sector Banks in India with NEFT facility'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-5020956535599906577</id><published>2010-02-22T09:01:00.000-08:00</published><updated>2010-02-22T09:01:02.083-08:00</updated><title type='text'>Right Configuration of BSNL Modem Type UT300R2U</title><content type='html'>Are you lost with your internet with the wrong configuration of your BSNL modem. Don&#39;t worry here is a step by step approach to configure the BSNL Modem and make your internet working.&lt;br /&gt;
&lt;br /&gt;
This configuration is applicable to the following type of Modem:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #5f5f5f; font-family: tahoma, sans-serif, arial, helvetica; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #5f5f5f; font-family: tahoma, sans-serif, arial, helvetica; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;3&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hd&quot; style=&quot;background-color: #e0e0e0; color: #5f5f5f; font-family: tahoma, sans-serif, arial, helvetica; font-size: x-small; font-weight: bold;&quot;&gt;UTSTARCOM Model Name:&lt;/td&gt;&lt;td style=&quot;background-color: white; color: #5f5f5f; font-family: tahoma, sans-serif, arial, helvetica; font-size: x-small;&quot;&gt;UT300R2U&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Step1:&lt;/b&gt; Type the IP Address &#39;192.168.1.1&#39; in the address bar of browser. It will ask for username and password. So the default username=admin and the password=admin. After successful login the following screen will be displayed.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDn7curepfqOKV7kUymnE2Wf77zZ8ttzPtUYHYk1rUPj0EleIW-1fdRWfLL7MmqVxqnvaAaioLeOGURYBaod9ixfSEVFiS7JefL0sv32_SSdRFsQWCthxWfc-OpMCG0J5vRleTvg7I3xj/s1600-h/image1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDn7curepfqOKV7kUymnE2Wf77zZ8ttzPtUYHYk1rUPj0EleIW-1fdRWfLL7MmqVxqnvaAaioLeOGURYBaod9ixfSEVFiS7JefL0sv32_SSdRFsQWCthxWfc-OpMCG0J5vRleTvg7I3xj/s1600-h/image1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDn7curepfqOKV7kUymnE2Wf77zZ8ttzPtUYHYk1rUPj0EleIW-1fdRWfLL7MmqVxqnvaAaioLeOGURYBaod9ixfSEVFiS7JefL0sv32_SSdRFsQWCthxWfc-OpMCG0J5vRleTvg7I3xj/s320/image1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step2:&lt;/b&gt; Click on the &quot;Advanced Setup&quot; link in the left side of the window. The following screen will be displayed.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUcKV-C0tQrCk1oayVkDHTCDPaOAnu_j-_ozVLXstLGKpHPCZ0Jlz84juiWqo1a8g7XU1_QjSOJvYKEsz2PUZFGpCPtpZgegt3p94eh9I0zIW5zVyic-fxa1IFmzqAyDCWwLpbYHoUcXdq/s1600-h/image2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUcKV-C0tQrCk1oayVkDHTCDPaOAnu_j-_ozVLXstLGKpHPCZ0Jlz84juiWqo1a8g7XU1_QjSOJvYKEsz2PUZFGpCPtpZgegt3p94eh9I0zIW5zVyic-fxa1IFmzqAyDCWwLpbYHoUcXdq/s320/image2.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step3:&lt;/b&gt; Click on the &quot;Edit&quot; Button if there is an entry in the right side table. If no entry then click on the &quot;Add&quot; button. Then the following screen will be displayed.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfBMK5ZKGW1huM18cGbx8JqNFYRsmdMqztKkHswSir1iJuMCM9Ecnw_rDf3outa0iG8vKOCHg5-Hx7HfLx8z6jAbIk08GFrr52X-w-MvvYpg0ZU-4_NEtwKV1uKud79IhChphfIPITgRbt/s1600-h/image3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfBMK5ZKGW1huM18cGbx8JqNFYRsmdMqztKkHswSir1iJuMCM9Ecnw_rDf3outa0iG8vKOCHg5-Hx7HfLx8z6jAbIk08GFrr52X-w-MvvYpg0ZU-4_NEtwKV1uKud79IhChphfIPITgRbt/s320/image3.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step4:&lt;/b&gt; Fill exactly the details mentioned in the above figure and click on the next button will show the following screen.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc0wTA-C4ID6qwMuC7khd89X7K54vS0x5DVxtO2hSCC9VKshBZMY8sdWQ50YoHVG0lBvtd9XuQvOq4-fCBqGiFwvd2_wgBiNnJetJQF0gzQ7BtiO4Z66ghyphenhyphen0s1fjPttUnhim7uiVU54R_2/s1600-h/image4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc0wTA-C4ID6qwMuC7khd89X7K54vS0x5DVxtO2hSCC9VKshBZMY8sdWQ50YoHVG0lBvtd9XuQvOq4-fCBqGiFwvd2_wgBiNnJetJQF0gzQ7BtiO4Z66ghyphenhyphen0s1fjPttUnhim7uiVU54R_2/s320/image4.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step5:&lt;/b&gt; After filling the details mentioned in the above figure proceed to the following screen by clicking next.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLzQB7FaRhSxSeSX2E7gBKD9y99LKfsv4PpmFlOdcDCaXl9fc9gOvL9AZ6Nm3m0z_-ZT-ohFDZ3WlW42dfcCBG5C1WSuZOBQU1gk9qcaQKysirSHKKHlMicvQeX2Gnom6pOGYJE36ILsw/s1600-h/image5.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLLzQB7FaRhSxSeSX2E7gBKD9y99LKfsv4PpmFlOdcDCaXl9fc9gOvL9AZ6Nm3m0z_-ZT-ohFDZ3WlW42dfcCBG5C1WSuZOBQU1gk9qcaQKysirSHKKHlMicvQeX2Gnom6pOGYJE36ILsw/s320/image5.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step6:&lt;/b&gt; The PPP Username &amp;amp; PPP Password are provided by the BSNL personnel at the time of installation of broadband. If you don&#39;t have then call up to the customer care number 1504 (for chennai). After providing the above details then proceed to the next step by clicking next button.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Xcip-vNqpHURTxQankJmBxZORjKWhChF5FV4d-_HePcl0nw3P15sScRbc9y1f09wi92Wliixidfs3GJjqBuyVbIpgxpZMs88nyjf5p8Hiv8xFHm2GXicC-oBMAUrHHy1oWZwiiTonPzq/s1600-h/image6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Xcip-vNqpHURTxQankJmBxZORjKWhChF5FV4d-_HePcl0nw3P15sScRbc9y1f09wi92Wliixidfs3GJjqBuyVbIpgxpZMs88nyjf5p8Hiv8xFHm2GXicC-oBMAUrHHy1oWZwiiTonPzq/s320/image6.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step7:&lt;/b&gt; Provide the above details and click next button.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnFukh5zU5M5MNyGY7fJTxS7K_hz2kA0VMefW_RMDOgbUTB9D8apTbKYwuiUEh0nnQbiDQVLEd4zurNwTdiHkIb_QgrdIvByv8UmpHGt7hNd5BoLvDOjbCtm0H9dZ8w45YMfbulmrGsymK/s1600-h/image7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnFukh5zU5M5MNyGY7fJTxS7K_hz2kA0VMefW_RMDOgbUTB9D8apTbKYwuiUEh0nnQbiDQVLEd4zurNwTdiHkIb_QgrdIvByv8UmpHGt7hNd5BoLvDOjbCtm0H9dZ8w45YMfbulmrGsymK/s320/image7.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step8:&lt;/b&gt; You are done with the configuration and click save now. You will see the following configuration.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTUIPMldMJY-v_kSQVNel9vyrQ0VF9lYg6CBwz9xjXy9Qhp5jjSUzmV_v0uc9YDAopYlacUxOEF0FjSA6SwlDl7MYy75074rNQkZhGNAgVAy55A0j0lKj18fZE-B8JXVvxlaakxllPhjn-/s1600-h/image8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTUIPMldMJY-v_kSQVNel9vyrQ0VF9lYg6CBwz9xjXy9Qhp5jjSUzmV_v0uc9YDAopYlacUxOEF0FjSA6SwlDl7MYy75074rNQkZhGNAgVAy55A0j0lKj18fZE-B8JXVvxlaakxllPhjn-/s320/image8.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step9:&lt;/b&gt; After this step click Save/Reboot button under Management link in the left panel. You will see the following screen.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVJOWTjG_zdUL7eEwwWN2zdWv3u120N384UYBwAqANkYmI30D1H9P65sexX6cQMOIlNg9rdHFdaGyUazekPzEhqgcEuHg65bFWABzxrM7zcV9-wmZEqgefHE2A9sqwbV_MqZGYnACTCskF/s1600-h/image9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVJOWTjG_zdUL7eEwwWN2zdWv3u120N384UYBwAqANkYmI30D1H9P65sexX6cQMOIlNg9rdHFdaGyUazekPzEhqgcEuHg65bFWABzxrM7zcV9-wmZEqgefHE2A9sqwbV_MqZGYnACTCskF/s320/image9.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step10:&lt;/b&gt; Click on the Save/Reboot button to reboot the modem with the new configuration provided by you.The modem will take 2 minutes to reboot. After successful reboot click on the &quot;Diagnostics&quot; link on the left side they you should see the &quot;PASS&quot; status as shown in the following figure.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhFanQ_PoBQWDNEBZRsj3M8gamLkkn37p04F4GBqmjHN9dEwUeHccpOJKK4UEZl2Am34c-viPZioyE5GvS4zQxHg3cEty4J3Ie8YLUPtF7U2n7WGnpfQ5VJ3EksymoqQVgCVPDfzTuxjOr/s1600-h/image10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhFanQ_PoBQWDNEBZRsj3M8gamLkkn37p04F4GBqmjHN9dEwUeHccpOJKK4UEZl2Am34c-viPZioyE5GvS4zQxHg3cEty4J3Ie8YLUPtF7U2n7WGnpfQ5VJ3EksymoqQVgCVPDfzTuxjOr/s320/image10.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;That completes the Modem Configuration. If everything goes fine then happy browsing...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/5020956535599906577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/right-configuration-of-bsnl-modem-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5020956535599906577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5020956535599906577'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/right-configuration-of-bsnl-modem-type.html' title='Right Configuration of BSNL Modem Type UT300R2U'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoDn7curepfqOKV7kUymnE2Wf77zZ8ttzPtUYHYk1rUPj0EleIW-1fdRWfLL7MmqVxqnvaAaioLeOGURYBaod9ixfSEVFiS7JefL0sv32_SSdRFsQWCthxWfc-OpMCG0J5vRleTvg7I3xj/s72-c/image1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-2814013739724720395</id><published>2010-02-12T01:16:00.001-08:00</published><updated>2010-02-12T01:46:28.027-08:00</updated><title type='text'>Free SMS Service &amp;amp; SMS Gateway</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;Nowadays many sites are coming up with free SMS services. You can send free SMS within India to any mobile number. &lt;br /&gt;
&lt;br /&gt;
There are many questions arise at this point of time.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;ul&gt;&lt;li&gt;How actually does this works?&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;How SMS send over internet reaches mobile?&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;How they are able to provide this service for free? &lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;Etc…&lt;/li&gt;
&lt;/ul&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;Let&#39;s have a look at these points.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi900X6W-jMxFP4ozorlBzeD0oy0y5VEf2K-w0fyQNK5Y5eq1_unkF1V4pLyMzO06p0TMVjwQlE6QZEIyvyzlqRjRQ_S6mSNZS9-PzsqNj3pjqKiXUvTx7c_QIIKsPm-PYiyGcwncPUjH_V/s1600-h/smsgateway.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi900X6W-jMxFP4ozorlBzeD0oy0y5VEf2K-w0fyQNK5Y5eq1_unkF1V4pLyMzO06p0TMVjwQlE6QZEIyvyzlqRjRQ_S6mSNZS9-PzsqNj3pjqKiXUvTx7c_QIIKsPm-PYiyGcwncPUjH_V/s400/smsgateway.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;br /&gt;
Explanation of above diagram: &lt;br /&gt;
&lt;br /&gt;
Step1: User login to the web site that provides the Free SMS service and enters the mobile number (Destination mobile number) to which he/she wants to send the SMS.&lt;br /&gt;
&lt;br /&gt;
Step2: The mobile number will be sent to the Web Hosting server through Internet. &lt;br /&gt;
&lt;br /&gt;
Step3: The Web Hosting server is connected with a GSM modem or a mobile phone with GSM SIM card.&lt;br /&gt;
&lt;br /&gt;
Step4: An opensource application like Gammu (&lt;a href=&quot;http://www.gammu.org/&quot;&gt;http://www.gammu.org/&lt;/a&gt;) will be running in the Web Hosting Server which will actually communicate with the GSM Modem/Mobile Phone and send the SMS to the destination Mobile phone using the GSM technology.&lt;br /&gt;
&lt;br /&gt;
Step5: The destination mobile number will receive the SMS which actually routed through SMS Gateway.&lt;br /&gt;
&lt;br /&gt;
This Simple setup can be done by any individual with internet connection and a mobile phone with GSM SIM card. Nowadays there are many plans available with mobile operators providing unlimited SMS with some monthly minimal amount.&lt;br /&gt;
&lt;br /&gt;
Hope this Helps!!&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.linkreferral.com/adwel.pl?oldrefid=279730&quot;&gt;&lt;img src=&quot;http://www.linkreferral.com/images/linkreferal/linkbutton.gif&quot; border=&quot;0&quot; alt=&quot;This site is about simple techniques of writing programs in various programming languages and posts about general internet technologies.&quot; width=&quot;114&quot; height=&quot;32&quot;&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/2814013739724720395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/free-sms-service-sms-gateway.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/2814013739724720395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/2814013739724720395'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/free-sms-service-sms-gateway.html' title='Free SMS Service &amp;amp; SMS Gateway'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi900X6W-jMxFP4ozorlBzeD0oy0y5VEf2K-w0fyQNK5Y5eq1_unkF1V4pLyMzO06p0TMVjwQlE6QZEIyvyzlqRjRQ_S6mSNZS9-PzsqNj3pjqKiXUvTx7c_QIIKsPm-PYiyGcwncPUjH_V/s72-c/smsgateway.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-6852657642906061731</id><published>2010-02-11T23:04:00.001-08:00</published><updated>2010-02-11T23:04:50.571-08:00</updated><title type='text'>India E-Governance</title><content type='html'>&lt;span xmlns=&#39;&#39;&gt;&lt;p&gt;Those days have gone where you have to roam around the government offices for days and months to get your work done. Now India is transforming by taking advantage of E-Governance. It makes easy for the Citizens and Entrepreneurs in getting the work done and gives the transparency from the Govt. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;One such thing is the Ministry of Corporate Affairs (MCA) went online for many services. Here are the some services which can be requested online.&lt;br /&gt;&lt;/p&gt;&lt;ul style=&#39;margin-left: 38pt&#39;&gt;&lt;li&gt;Register a public or private limited company&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Acquiring a Digital Signature&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Director Identification Number (DIN)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Payment of Stamp Duty (EStamp)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;etc…&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If you are interested in starting a business then it is mandatory to register a company with the government of India. You get lot more information on opening a public or private limited company by visiting &lt;a href=&#39;http://www.mca.gov.in/&#39;&gt;http://www.mca.gov.in/&lt;/a&gt; .&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/6852657642906061731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/india-e-governance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/6852657642906061731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/6852657642906061731'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/india-e-governance.html' title='India E-Governance'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-3257835760510680013</id><published>2010-02-11T20:41:00.001-08:00</published><updated>2010-02-11T20:41:36.706-08:00</updated><title type='text'>Earn Money through Internet?</title><content type='html'>&lt;span xmlns=&#39;&#39;&gt;&lt;p&gt;Everybody will be interested in earning money through internet but not sure how to proceed. There are different ways one can start earning money like Blogging (with ads), Work from Home Jobs, Data Entry jobs etc. If you are a good programmer and interested to work on projects from home there are some sites through which you can bid for a project with your quotation and get the project. Here are the few sites through which you can search for a project that matching your profile and bid for it.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&#39;http://www.elance.com/&#39;&gt;http://www.elance.com/&lt;/a&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;a href=&#39;http://rfq.programmingbids.com/&#39;&gt;http://rfq.programmingbids.com/&lt;/a&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;a href=&#39;http://www.rentacoder.com/&#39;&gt;http://www.rentacoder.com/&lt;/a&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;a href=&#39;http://www.freelancers.net/&#39;&gt;http://www.freelancers.net/&lt;/a&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;One more thing to mention if you are a coding guru then you should visit &lt;a href=&#39;http://www.topcoder.com/&#39;&gt;http://www.topcoder.com/&lt;/a&gt; where you can challenge your coding skills and get money if you win the contest.&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/3257835760510680013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/earn-money-through-internet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3257835760510680013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/3257835760510680013'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/earn-money-through-internet.html' title='Earn Money through Internet?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-5551197573888072325</id><published>2010-02-09T19:36:00.001-08:00</published><updated>2010-02-09T20:31:30.192-08:00</updated><title type='text'>Java and XPath</title><content type='html'>&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;XPath is an alternate way of accessing elements and attributes of XML document. XPath is a standard recommended by W3C. XPath looks like unix path separated by &#39;/&#39;.&lt;br /&gt;
&lt;br /&gt;
XPath has got many built-in functions for navigating Nodes and Attributes of XML. XQuery and XPointer was built on top of XPath.&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=&quot;&quot;&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;span xmlns=&quot;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;Example XML:&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bookstore&amp;gt;&lt;br /&gt;
&amp;lt;book&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;title lang=&quot;english&quot;&amp;gt;Harry Potter 2 &amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;price&amp;gt;40&amp;lt;/price&amp;gt;&lt;br /&gt;
&amp;lt;/book&amp;gt;&lt;br /&gt;
&amp;lt;book&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;title lang=&quot;german&quot;&amp;gt;Learning XML&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;price&amp;gt;50&amp;lt;/price&amp;gt;&lt;br /&gt;
&amp;lt;/book&amp;gt;&lt;br /&gt;
&amp;lt;/bookstore&amp;gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; font-family: &#39;Courier New&#39;; font-size: 9pt;&quot;&gt;XPath Expression: /bookstore/book/title[@lang=&#39;german&#39;]&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
This XPath expression retrieves all the book titles with language German. The XPath helps in retrieving the required data with a single expression.&lt;br /&gt;
&lt;br /&gt;
Now let&#39;s see how we can use this in Java to parse XML documents.&lt;br /&gt;
&lt;br /&gt;
JDK comes with a separate package java.xml.xpath from version 1.5 onwards. So, no need to have any external libraries to be included into the classpath.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;    DocumentBuilderFactory domFactory = DocumentBuilderFactory.&lt;em&gt;newInstance&lt;/em&gt;();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    DocumentBuilder builder = domFactory.newDocumentBuilder();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    Document doc = builder.parse(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;catalogue.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    XPath xpath = XPathFactory.&lt;em&gt;newInstance&lt;/em&gt;().newXPath();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    XPathExpression expr = xpath.compile(&lt;/span&gt;&lt;span style=&quot;color: #2a00ff;&quot;&gt;&quot;/bookstore/book/title[@lang=&#39;german&#39;]&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    Object result = expr.evaluate(doc, XPathConstants.&lt;/span&gt;&lt;span style=&quot;color: #0000c0;&quot;&gt;&lt;em&gt;NODESET&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;    NodeList nodes = (NodeList) result;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;strong&gt;for&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;strong&gt;int&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; i = 0; i &amp;lt; nodes.getLength(); i++) &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;     &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.&lt;/span&gt;&lt;span style=&quot;color: #0000c0;&quot;&gt;&lt;em&gt;out&lt;/em&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;.println(nodes.item(i).getNodeValue()); &lt;/span&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;}&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f0055;&quot;&gt;&lt;strong&gt;catch&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(Exception ex)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;ex.printStackTrace();&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
The above code snippet give the result of all the book titles which has lang=&#39;german&#39;. The power of XPath lies in constructing the expression to retrieve right information.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/5551197573888072325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-work-with-xpath.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5551197573888072325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5551197573888072325'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-work-with-xpath.html' title='Java and XPath'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-5708045131177235905</id><published>2010-02-08T03:49:00.000-08:00</published><updated>2010-02-08T03:49:47.280-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Swings"/><title type='text'>Adding Custom Filter to JFileChooser in Java</title><content type='html'>JFile chooser doesn&#39;t filter any file types. It displays all types of files in the File Chooser dialog. It is the developer responsibility to extend the FileFilter class&amp;nbsp;to filter&amp;nbsp;particular type of file.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
See below how&amp;nbsp;to do that:&lt;br /&gt;
&lt;br /&gt;
Extend the FileFilter class as follows.&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;public class ExampleFileFilter extends FileFilter {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;public ExampleFileFilter(String extension, String description) {&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;this();&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;if (extension != null) {&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;addExtension(extension);&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;if (description != null) {&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;setDescription(description);&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
public void setDescription(String description) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this.description = description;&lt;br /&gt;
&lt;br /&gt;
fullDescription = null;&lt;br /&gt;
&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/5708045131177235905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/01/adding-custom-filter-to-jfilechooser-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5708045131177235905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/5708045131177235905'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/01/adding-custom-filter-to-jfilechooser-in.html' title='Adding Custom Filter to JFileChooser in Java'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-1319610582568117635</id><published>2010-02-02T08:52:00.000-08:00</published><updated>2010-02-08T03:43:13.634-08:00</updated><title type='text'>How to achieve Secured HTTP communication in Java?</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: arial, helvetica, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial;&quot;&gt;&lt;div&gt;The Java Secure Socket Extension (JSSE) libraries are introduced as a standard from J2SE version 1.4 platform. The libraries offer support for handling secure HTTP requests and responses, also known as HTTPS or HTTP over SSL. More specifically, JSSE libraries provide the functionality necessary for authentication, encryption, and integrity. This support ensures that data sent over the network is private and not sent as clear text (that is, text that is publicly viewable and understandable).&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;The javax.net.ssl package contains the API for communicating through the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. SSL and TLS are two closely related protocols for securing network traffic. Authentication is provided through the use of X.509 certificates -- this authentication is available for both the client and server, not just the server. In addition, the JSSE libraries offer encryption through secret key exchanges and certificate public keys. Encryption ensures message integrity, preventing a person in the middle of the communication from intercepting the message, altering it, and passing it on as if it was unchanged.&lt;/div&gt;&lt;div&gt;If you&#39;re not interested in direct socket usage and sending HTTP commands themselves, you can use the &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HttpsURLConnection&lt;/span&gt; class. The &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HttpsURLConnection &lt;/span&gt;class includes full support for features such as redirection, connection retries, proxy negotiations and cookies.&lt;/div&gt;&lt;div&gt;If you are interested in working with sockets directly, either for HTTP/HTTPS transactions, or for custom application-level usage, you can combine the javax.net.ssl package with the factories in javax.net. This allows you to communicate over a secured connection over which HTTPS runs. If you&#39;re familiar with communicating over an HTTP Socket connection, you&#39;ll find that working with an SSL-based socket isn&#39;t much different. You simply tend to talk over a different port, 443 instead of 80, for normal web traffic.&lt;/div&gt;&lt;div&gt;To securely communicate, you first need to acquire a socket factory. From the factory, you create a socket for the specific host and port. Instead of calling the Socket constructor, you ask theSocketFactory for a socket. The SocketFactory you use is the default SSL version of the factory,&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;javax.net.ssl.SSLSocketFactory&lt;/span&gt;:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; SocketFactory factory = SSLSocketFactory.getDefault();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;Socket socket =&amp;nbsp;factory.createSocket(hostname, HTTPS_PORT);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;After that, the process is essentially the same as using an HTTP-based socket. You send a request to the server, and listen for a reply:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;// Send Request&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;OutputStream outputStream =&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;socket.getOutputStream();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;PrintWriter out = new PrintWriter(outputStream);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;out.print(&quot;GET / HTTP/1.0\r\n\r\n&quot;);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;out.flush();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Get Response&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;InputStream inputStream =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;socket.getInputStream();&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;InputStreamReader inputStreamReader =&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new InputStreamReader(inputStream);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;BufferedReader in =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;new BufferedReader(inputStreamReader);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;String line;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;while ((line = in.readLine()) != null) {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(line);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Here is a program, SSLClient,that puts all the pieces together:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; import java.io.BufferedReader;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.io.InputStream;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.io.InputStreamReader;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.io.IOException;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.io.OutputStream;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.io.PrintWriter;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import java.net.Socket;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import javax.net.SocketFactory;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; import javax.net.ssl.SSLSocketFactory;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; public class SSLClient {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; private static final int HTTPS_PORT = 443;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; public static void main(String args[]) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (args.length == 0) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&quot;Please provide a hostname to connect to&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.exit(-1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; String hostname = args[0];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Get the default SSL socket factory&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SocketFactory factory =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SSLSocketFactory.getDefault();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Using socket factory, get SSL socket to port on host&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Socket socket =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; factory.createSocket(hostname, HTTPS_PORT);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Send request to get root&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Be sure to end string with two sets of carriage&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // return - newline characters.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OutputStream outputStream =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.getOutputStream();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PrintWriter out = new PrintWriter(outputStream);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out.print(&quot;GET / HTTP/1.0\r\n\r\n&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out.flush();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fetch response&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InputStream inputStream =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.getInputStream();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; InputStreamReader inputStreamReader =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new InputStreamReader(inputStream);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedReader in =&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new BufferedReader(inputStreamReader);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String line;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while ((line = in.readLine()) != null) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(line);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Close everything&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out.close();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in.close();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; socket.close();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException e) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.err.println(&quot;Problems talking to &quot; + hostname);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;When you run the program, pass in the name of the host you want to communicate with. Consider running Tomcat locally, or connect to java.com. Note that the port constant in SSLClient is 443. You can alter the HTTPS port constant in the program if you need to, or you can change the program so that the constant is specified on the command line.&lt;/div&gt;&lt;div&gt;The results of communicating over the HTTPS port might be different than the results you get when communicating over the regular HTTP port. Consider saving the output and view it in your browser. You should trim off the standard header values, such as the date and time and server. Of course, you should leave in the server value if you&#39;re interested in what server a site is using. For instance, connecting to www.sun.com through the SSLClient program:&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; java SSLClient www.sun.com&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;reveals the use of the SunONE WebServer 6.0 in the various header fields:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; HTTP/1.1 200 OK&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; Server: SunONE WebServer 6.0&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; Date: Tue, 02 Feb 2010 22:30:32 GMT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; P3p: policyref=&quot;http://www.sun.com/p3p/Java_P3P_Policy.xml&quot;,&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; ...&lt;/div&gt;&lt;div&gt;Clients should examine the credentials received to make sure that they are talking to the host they think they are. Use &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;socket.getSession()&lt;/span&gt;,&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; getPeerCertificates() &lt;/span&gt;or &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;getPeerPrincipal()&lt;/span&gt;. It&#39;s non-trivial for someone to reroute the connection to a malicious host, and this is one way to check against that. You can use the HostnameVerifier interface to verify the host name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/1319610582568117635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-achieve-secured-http.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/1319610582568117635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/1319610582568117635'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-achieve-secured-http.html' title='How to achieve Secured HTTP communication in Java?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-2510800851135782320</id><published>2010-02-02T08:33:00.000-08:00</published><updated>2010-02-02T08:33:17.355-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Swings"/><title type='text'>How to mask password field in Java?</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Login windows use password masking as a technique to either hide the password as it is being typed or displaying a character (such as an asterisk &#39;*&#39;) instead of the characters that users type. For example, when you login on a Windows machine, you are presented with a login dialog box in which the password field uses an asterisk as the masking or echo character.&lt;/div&gt;&lt;div&gt;If you wish to provide a graphical login dialog box for your application, you can use the JPasswordField, which allows the editing of a single line of text where the view indicates something was typed, but does not show the original characters. If you use the JPasswordField, the default echo character is an asterisk &#39;*&#39;, but you can change it to any character of your choice. Again, if you set the echo character to zero, 0, it means that characters will be displayed as they are typed and no masking will be performed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;example snippet of code:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;JPasswordField password = new JPasswordField(8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;password.setEchoChar(&#39;#&#39;);&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/2510800851135782320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-mask-password-field-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/2510800851135782320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/2510800851135782320'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/02/how-to-mask-password-field-in-java.html' title='How to mask password field in Java?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6536551626514470628.post-1892127171130872368</id><published>2010-01-30T09:14:00.000-08:00</published><updated>2010-02-08T03:50:07.407-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Swings"/><title type='text'>How to Export JTable data into Excel Sheet?</title><content type='html'>Some times it is required to generate report based on the data in the JTable. In that case the POI-HSSF API to access Microsoft Excel document is very &amp;nbsp;much useful to generate Excel file using the content of JTable.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s see below how to use this API to generate Excel file.&lt;br /&gt;
As &lt;span style=&quot;font-family: inherit;&quot;&gt;a&lt;/span&gt; first step download the API from &lt;a href=&quot;http://poi.apache.org/spreadsheet/index.html&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
Place the poi &amp;nbsp;jar files into the your classpath.&lt;br /&gt;
First create a workbook like this.&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFWorkbook wb = new HSSFWorkbook();&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Then create worksheet with the following method.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFSheet sheet = wb.createSheet(sheetNames);&lt;/span&gt;&lt;/div&gt;&amp;nbsp;The work sheet can be decorated with different font properties as follows.&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFFont sheetTitleFont = wb.createFont();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sheetTitleFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFCellStyle sheetTitleFontCellStyle = wb.createCellStyle();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sheetTitleFontCellStyle.setFont(sheetTitleFont);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFRow sheetTitleRow = sheet.createRow( (short) row);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;HSSFCell cell = sheetTitleRow.createCell( (short) 0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The following method will set the value to the cell in the excel sheet.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cell.setCellValue(tableTitle);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;cell.setCellStyle(sheetTitleFontCellStyle);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;provide some file path in this method&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;FileOutputStream fos = new FileOutputStream(xlsFilePath);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;BufferedOutputStream bos = new BufferedOutputStream(fos);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;write the work book content into the xls file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;wb.write(bos);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;bos.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fos.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;return true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;} catch (Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;return false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;} catch (Exception e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;e.printStackTrace();&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://writeprogram.blogspot.com/feeds/1892127171130872368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://writeprogram.blogspot.com/2010/01/how-to-export-jtable-data-into-excel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/1892127171130872368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6536551626514470628/posts/default/1892127171130872368'/><link rel='alternate' type='text/html' href='http://writeprogram.blogspot.com/2010/01/how-to-export-jtable-data-into-excel.html' title='How to Export JTable data into Excel Sheet?'/><author><name>Purushotham</name><uri>http://www.blogger.com/profile/07185576018365801761</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>