<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Zipwhip&#039;s Blog</title>
	<atom:link href="http://zipwhip.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://zipwhip.wordpress.com</link>
	<description>Cloud texting</description>
	<lastBuildDate>Sat, 25 Feb 2012 01:02:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='zipwhip.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/c21e2916009176d0dc117b5408b5306e?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Zipwhip&#039;s Blog</title>
		<link>http://zipwhip.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://zipwhip.wordpress.com/osd.xml" title="Zipwhip&#039;s Blog" />
	<atom:link rel='hub' href='http://zipwhip.wordpress.com/?pushpress=hub'/>
		<item>
		<title>TechCrunch&#8217;d</title>
		<link>http://zipwhip.wordpress.com/2012/02/24/techcrunchd/</link>
		<comments>http://zipwhip.wordpress.com/2012/02/24/techcrunchd/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 00:55:34 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zipwhip.wordpress.com/?p=388</guid>
		<description><![CDATA[&#160; TechCrunch&#8217;d (noun):  1) The act of getting published on the popular website techcrunch.com 2) A quick way to see increased traffic to your website. At 9:00 a.m. this morning, we were fortunate enough to be featured on techcrunch.com. TechCrunch Gadgets editor John Biggs posted the story, which is about our new user sign up flag. Included in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=388&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span style="text-align:center; display: block;"><a href="http://zipwhip.wordpress.com/2012/02/24/techcrunchd/"><img src="http://img.youtube.com/vi/LN70s8HDo8I/2.jpg" alt="" /></a></span>
<p>&nbsp;</p>
<p>TechCrunch&#8217;d (<em>noun</em>):  1) The act of getting published on the popular website techcrunch.com 2) A quick way to see increased traffic to your website.</p>
<p>At 9:00 a.m. this morning, we were fortunate enough to be featured on<a href="http://techcrunch.com/2012/02/24/zipwhip-builds-a-robotic-flag-to-add-fun-to-the-disheartening-slow-rise-of-the-average-start-up/?grcc=33333Z98"> techcrunch.com</a>. TechCrunch Gadgets editor <a href="https://twitter.com/#!/search/john%20biggs">John Biggs</a> posted the story, which is about our new user sign up flag. Included in his submission is the video portion of our Monday (2/20/12) blog entry. According to TechCrunch, the piece is now trending. It drove a significant amount of traffic to our <a href="http://zipwhip.com/">website</a>, and we decided to share our reaction with all of you. Enjoy.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/388/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/388/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/388/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=388&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2012/02/24/techcrunchd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>
	</item>
		<item>
		<title>Zipwhip New User Sign Up Flag</title>
		<link>http://zipwhip.wordpress.com/2012/02/22/zipwhip-new-user-sign-up-flag/</link>
		<comments>http://zipwhip.wordpress.com/2012/02/22/zipwhip-new-user-sign-up-flag/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 04:34:48 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://zipwhip.wordpress.com/?p=266</guid>
		<description><![CDATA[At Zipwhip we like to keep it fun and nerdy. So, we decided to do something a bit whimsical every time we get a new sign up on our site. We purchased some hardware, put in a weekend of work, and now we have a flag hanging on the wall in the office that automatically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=266&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<span style="text-align:center; display: block;"><a href="http://zipwhip.wordpress.com/2012/02/22/zipwhip-new-user-sign-up-flag/"><img src="http://img.youtube.com/vi/zEsBR1wp9F8/2.jpg" alt="" /></a></span>
<p>At Zipwhip we like to keep it fun and nerdy. So, we decided to do something a bit whimsical every time we get a new sign up on our site. We purchased some hardware, put in a weekend of work, and now we have a flag hanging on the wall in the office that automatically goes up every time we get a new sign up on our site!</p>
<p>The flag is attached to a servo motor and an <a href="http://www.arduino.cc/">Arduino</a> over ethernet . Each time we get the sign up event inside our cloud infrastructure, we send an HTTP command to the embedded web server running on the Arduino. The Arduino then sends the appropriate commands to the servo and UP POPS THE FLAG!</p>
<p>It&#8217;s a ton of fun to see something visual happen each time we get a new user.</p>
<p>The one concern is that we may have to build in a queue to the software that sends the signal to the Arduino. This is because we get quite a few sign ups. So much so, that we will get a lag between when the flag actually moves, and the exact time the sign up occurred. If the queues fill up too much or the lag gets too long, we will likely just reduce the size of our flag and make a wall of flags all moving independently.</p>
<p><a href="http://zipwhip.files.wordpress.com/2012/02/flag-001.jpg"><img class="alignnone size-medium wp-image-384" title="flag 001" src="http://zipwhip.files.wordpress.com/2012/02/flag-001.jpg?w=300&#038;h=200" alt="" width="300" height="200" /></a></p>
<p>Want to make your own? Below is a screenshot of (a.) the code inside the Arduino IDE (b.) the board diagram and (c.) the Arduino code to make it happen.</p>
<p>Here&#8217;s our bill of materials:</p>
<ul>
<li>1 Yard of Orange Fabric. 100% Cotton. Joanne Fabrics. $2.</li>
<li>1 Bottle of Liquid Stitch. Joanne Fabrics. $6.</li>
<li>1 Wooden Dowel. Joanne Fabrics. $2.</li>
<li>1 Avery Light Fabric Inkjet Transfer Pack. Staples. $20.</li>
<li>1 Arduino. SparkFun.com. $29.</li>
<li>1 Arduino Ethernet Shield. SparkFun.com. $40.</li>
<li>1 Savox 400 oz-in SC-1256TG High Torque Titanium Gear Standard Digital Coreless Servo. <a href="http://www.savoxusa.com/">http://www.savoxusa.com</a> $80.</li>
<li>1 Power Adapter. 6V DC 2 Amp. Lynxmotion.com.</li>
<li>1 40’ Ethernet cable. Newegg.com. $2.</li>
<li>1 Ikea Akurum Harlig White Door as Mount. Ikea. $5.</li>
<li>8 Wood Screws. #10 size for servo. #2 size for Arduino. $5.</li>
</ul>
<p>This is a screenshot of how you use the Arduino IDE to write your code. The free IDE is available at http://www.arduino.cc.</p>
<p><a href="http://zipwhip.files.wordpress.com/2012/02/newarduino.png"><img class="alignnone size-full wp-image-376" title="newarduino" src="http://zipwhip.files.wordpress.com/2012/02/newarduino.png?w=630" alt=""   /></a></p>
<p>This is a Fritzing diagram of the Arduino main board and the Arduino Ethernet Shield combined with the servo wiring. The hardest part of getting this schematic to work is getting enough power to the servo without sending it through the Arduino control pins.</p>
<p><a href="http://zipwhip.files.wordpress.com/2012/02/arduino1.png"><img class="alignnone size-full wp-image-368" title="arduino" src="http://zipwhip.files.wordpress.com/2012/02/arduino1.png?w=630&#038;h=257" alt="" width="630" height="257" /></a></p>
<p>And finally here is the full code to run your own flag. We painstakingly perfected the code so you know it&#8217;s ready to go for your own use.</p>
<p>________________________________________________________________________________________________________</p>
<p>/*</p>
<p>Web Server</p>
<p>A simple web server that shows the value of the analog input pins.<br />
using an Arduino Wiznet Ethernet shield.</p>
<p>Circuit:<br />
* Ethernet shield attached to pins 10, 11, 12, 13<br />
* Analog inputs attached to pins A0 through A5 (optional)</p>
<p>*/</p>
<p>// Sweep<br />
// by BARRAGAN &lt;http://barraganstudio.com&gt;<br />
// This example code is in the public domain.</p>
<p>// Zipwhip Sign Up Flag Codebase<br />
// This code lets the Arduino operate a webserver. Whenever any<br />
// request comes in to the server, it raises the flag. It&#8217;s quite<br />
// simple. If too many requests are going to come in, the server is<br />
// single-threaded so other requests have to wait. The sending process<br />
// may want to instituate it&#8217;s own queuing system to solve for this.</p>
<p>#include &lt;SPI.h&gt;<br />
#include &lt;Ethernet.h&gt;<br />
#include &lt;Servo.h&gt;</p>
<p>Servo myservo; // create servo object to control a servo<br />
// a maximum of eight servo objects can be created</p>
<p>int pos = 0; // variable to store the servo position<br />
int startPos = 154;</p>
<p>// Enter a MAC address and IP address for your controller below.<br />
// The IP address will be dependent on your local network:<br />
byte mac[] = { 0xDA, 0xAD, 0xBA, 0xEA, 0xFE, 0xED };<br />
IPAddress ip(192,168,1, 252);</p>
<p>// Initialize the Ethernet server library<br />
// with the IP address and port you want to use<br />
// (port 80 is default for HTTP):<br />
EthernetServer server(80);<br />
EthernetClient client;</p>
<p>void setup()<br />
{</p>
<p>//Serial.begin(9600); // open the serial port at 9600 bps:</p>
<p>// start the Ethernet connection and the server:<br />
Ethernet.begin(mac, ip);<br />
server.begin();</p>
<p>// servo code<br />
myservo.attach(3); // attaches the servo on pin 9 to the servo object<br />
myservo.write(startPos);</p>
<p>// initialize the digital pin as an output.<br />
// Pin 13 has an LED connected on most Arduino boards:<br />
pinMode(13, OUTPUT);<br />
}</p>
<p>void loop()<br />
{<br />
// listen for incoming clients<br />
client = server.available();</p>
<p>if (client) {<br />
// an http request ends with a blank line<br />
boolean currentLineIsBlank = true;<br />
while (client.connected()) {<br />
if (client.available()) {<br />
char c = client.read();<br />
//Serial.print(c);</p>
<p>// if you&#8217;ve gotten to the end of the line (received a newline<br />
// character) and the line is blank, the http request has ended,<br />
// so you can send a reply<br />
if (c == &#8216;\n&#8217; &amp;&amp; currentLineIsBlank) {<br />
// send a standard http response header<br />
client.println(&#8220;HTTP/1.1 200 OK&#8221;);<br />
client.println(&#8220;Content-Type: text/html&#8221;);<br />
client.println();</p>
<p>// output that we are raising the flag<br />
client.println(&#8220;Zipwhip Sign Up Flag Going Up&lt;br /&gt;Degrees we will rotate to:&lt;br /&gt;&#8221;);<br />
raiseFlag();<br />
client.println(&#8220;Done&lt;br /&gt;&#8221;);<br />
//delay(100);<br />
//client.stop();</p>
<p>//raiseFlag();</p>
<p>break;<br />
}<br />
if (c == &#8216;\n&#8217;) {<br />
// you&#8217;re starting a new line<br />
currentLineIsBlank = true;<br />
}<br />
else if (c != &#8216;\r&#8217;) {<br />
// you&#8217;ve gotten a character on the current line<br />
currentLineIsBlank = false;<br />
}<br />
}<br />
}<br />
// give the web browser time to receive the data<br />
delay(10);<br />
// close the connection:<br />
client.stop();<br />
}<br />
}</p>
<p>void raiseFlag() {</p>
<p>digitalWrite(13, HIGH); // set the LED on</p>
<p>myservo.attach(3); // attaches the servo on pin 9 to the servo object</p>
<p>// servo code<br />
//myservo.attach(3); // attaches the servo on pin 9 to the servo object<br />
//delay(100);<br />
/* -10 (not possible on Sarvox Servo)<br />
* 0<br />
* 30<br />
* 60<br />
* 90 180<br />
* 160<br />
*/</p>
<p>// flag is all the way down. move it up. (may move to only 45 degrees down)<br />
for(pos = startPos; pos&gt;=30; pos-=1) // goes from 180 degrees to 0 degrees<br />
{<br />
client.print(pos);<br />
client.print(&#8221; &#8220;);<br />
//client.flush();<br />
myservo.write(pos); // tell servo to go to position in variable &#8216;pos&#8217;<br />
//delayMicroseconds(300);<br />
delay(20); // waits 15ms for the servo to reach the position<br />
}<br />
client.println(&#8220;Done going forward.&lt;br /&gt;&#8221;);</p>
<p>// Let&#8217;s pause by doing same positioning, but keep writing the same number<br />
for(int ctr = 0; ctr &lt; 60; ctr++)<br />
{<br />
myservo.write(pos);<br />
delay(15);<br />
}</p>
<p>// move flag all the way pointing down again<br />
for(pos = 30; pos &lt;= startPos; pos += 1) // goes from 0 degrees to 180 degrees<br />
{ // in steps of 1 degree<br />
client.print(pos);<br />
client.print(&#8221; &#8220;);<br />
//client.flush();<br />
myservo.write(pos); // tell servo to go to position in variable &#8216;pos&#8217;<br />
//delayMicroseconds(300);<br />
delay(20); // waits 15ms for the servo to reach the position<br />
}<br />
client.println(&#8220;Done going backward.&lt;br /&gt;&#8221;);<br />
//myservo.detach();<br />
delay(50);</p>
<p>myservo.detach(); // attaches the servo on pin 9 to the servo object</p>
<p>digitalWrite(13, LOW); // set the LED off</p>
<p>}</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=266&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2012/02/22/zipwhip-new-user-sign-up-flag/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>

		<media:content url="http://zipwhip.files.wordpress.com/2012/02/flag-001.jpg?w=300" medium="image">
			<media:title type="html">flag 001</media:title>
		</media:content>

		<media:content url="http://zipwhip.files.wordpress.com/2012/02/newarduino.png" medium="image">
			<media:title type="html">newarduino</media:title>
		</media:content>

		<media:content url="http://zipwhip.files.wordpress.com/2012/02/arduino1.png" medium="image">
			<media:title type="html">arduino</media:title>
		</media:content>
	</item>
		<item>
		<title>Zipwhip Twitter Track: Intro</title>
		<link>http://zipwhip.wordpress.com/2012/02/21/zipwhip-twiiter-track-intro/</link>
		<comments>http://zipwhip.wordpress.com/2012/02/21/zipwhip-twiiter-track-intro/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 03:25:23 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zipwhip.wordpress.com/?p=248</guid>
		<description><![CDATA[We&#8217;re extremely excited to be moving forward with all of our social media efforts here at Zipwhip.com. Our blogs, the basis of those efforts, will be published every Monday, Wednesday, and Friday, here at Zipwhip.com. We hope you&#8217;ll join us, as we bring the excitement and user friendly nature of cloud texting direct to consumer. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=248&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><iframe width="630" height="354" src="http://www.youtube.com/embed/U-CO6X0cJHI?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>We&#8217;re extremely excited to be moving forward with all of our social media efforts here at Zipwhip.com. Our blogs, the basis of those efforts, will be published every Monday, Wednesday, and Friday, here at<a href="www.zipwhip.com"> Zipwhip.com</a>. We hope you&#8217;ll join us, as we bring the excitement and user friendly nature of cloud texting direct to consumer.</p>
<p>With Twitter Track, our goal is to show you how many followers we pick up each month. We think it&#8217;s a simple and fun way to illustrate our progress in the social media realm, as we grow as a company. We&#8217;ll also give you a tip or two on how we pick up users, and stay connected with our fans. It&#8217;s going to be a fun ride, we&#8217;re glad you&#8217;re here with us!</p>
<p>Cheers</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/248/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=248&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2012/02/21/zipwhip-twiiter-track-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>
	</item>
		<item>
		<title>The Startup Conference-Seattle, &#8220;Project Frothy&#8221;</title>
		<link>http://zipwhip.wordpress.com/2012/02/17/151/</link>
		<comments>http://zipwhip.wordpress.com/2012/02/17/151/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 01:57:11 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zipwhip.wordpress.com/?p=151</guid>
		<description><![CDATA[The Startup Conference Seattle, Project “Frothy” February 16th, 2012 As a startup it’s critical to not only execute ideas, but to once in a while pull a white fluffy rabbit out of you’re a**, I mean hat—that’s what happened yesterday at The Startup Conference in Seattle, WA. On Wed Feb 16th at 9:45AM, project “Frothy” [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=151&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><iframe width="630" height="354" src="http://www.youtube.com/embed/xkOiDBHVgBM?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p><em>The Startup Conference Seattle, Project “Frothy”</em></p>
<p>February 16<sup>th</sup>, 2012</p>
<p>As a startup it’s critical to not only execute ideas, but to once in a while pull a white fluffy rabbit out of you’re a**, I mean hat—that’s what happened yesterday at <a href="http://thestartupconference.com/seattle/"><em>The Startup Conference</em></a> in Seattle, WA. On Wed Feb 16<sup>th</sup> at 9:45AM, project “Frothy” was conceived, 24 hours later “Frothy” was complete and deemed a success.</p>
<p><a href="http://zipwhip.com/">Zipwhip’s</a> CEO, John Lauer, was invited to speak on the conference panel, <em>How to get your story in the press</em>, moderated by John Cook of<a href="http://www.geekwire.com/"> Geekwire</a>. Although John had no shortage of past PR stunts to share with the audience, he wanted to make a splash at the conference that was both relevant to the panel, and fun. It was time for the world to start hearing about Zipwhip TextSpresso, which is slotted to launch on Monday, March 5<sup>th</sup>, 2012.</p>
<p>In short, Zipwhip TextPresso is a top of the line Jura Impressa XS90 (from <a href="http://www.seattlecoffeegear.com/">seattlecoffeegear.com</a>) that was stripped down and rejiggered to work with lots of moving parts imported from all around the world to deliver a perfectly rich and frothy TextSpresso, just the way you like it. In other words, you text in your order to the Zipwhip TextSpresso machine from wherever you are so that your morning latte is waiting for you at Zipwhip headquarters. And it just so happens to have your name and phone number printed on the top of the froth with edible inks- a little extra sizzle for the homies.</p>
<p>To our knowledge, there is no text enabled espresso machine anywhere in the world, which makes Zipwhip TextSpresso special and worth sharing with others. I can assure you that it’s worthy of experiencing for yourself, and that’s exactly what project “Frothy” set out to do. We extended an exclusive invite to all attendees of the conference by handing out a promotional greeting card as they arrived inviting them to text the word “frothy” to phone number 206 631 9536. Each participant received a one year subscription to perfectly rich and frothy TextSpresso from Zipwhip. From the amount of people I saw texting the word frothy, I’m confident that we’ll be seeing some new faces around the TextSpresso machine during the morning commute. In fact, we might end up needing to make the warming tray larger.</p>
<p>In closing, TextSpresso is completely absurd, potentially really stupid, but holy crap is it a lot of fun. For that reason alone, it was worth all the effort and it got the Co-founder of Geekwire, John Cook, to publicly say that’s the type of story he wants to write about.</p>
<p>Cheers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=151&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2012/02/17/151/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>
	</item>
		<item>
		<title>Does Cupid Text Message Too?</title>
		<link>http://zipwhip.wordpress.com/2012/02/15/does-cupid-text-message-too/</link>
		<comments>http://zipwhip.wordpress.com/2012/02/15/does-cupid-text-message-too/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 06:01:11 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zipwhip.wordpress.com/?p=93</guid>
		<description><![CDATA[Gone are the days of sending those artfully hand-scripted love notes to the ones you love. No more perfectly drawn hearts, or envelopes sealed with a kiss. It seems that nowadays, we&#8217;re just as happy to send a mushy text. Okay, okay, maybe that&#8217;s a bit dramatic, I&#8217;ll blame it on my dinner for 1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=93&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://zipwhip.files.wordpress.com/2012/02/linkedin-photo-shoot-0121.jpg"><img class="alignnone size-medium wp-image-148" title="LinkedIn Photo Shoot 012" src="http://zipwhip.files.wordpress.com/2012/02/linkedin-photo-shoot-0121.jpg?w=300&#038;h=200" alt="" width="300" height="200" /></a></p>
<p>Gone are the days of sending those artfully hand-scripted love notes to the ones you love. No more perfectly drawn hearts, or envelopes sealed with a kiss. It seems that nowadays, we&#8217;re just as happy to send a mushy text.</p>
<p>Okay, okay, maybe that&#8217;s a bit dramatic, I&#8217;ll blame it on my dinner for 1 last night. Before you cry foul though, my nostalgia has some merit. The eggheads over at business insider<a href="http://articles.businessinsider.com/2012-01-05/tech/30592071_1_eid-ul-adha-sms"> report</a> that text messaging spiked about 31% on Valentine&#8217;s Day in 2011, coming in just behind Christmas Day when compared with a control day. Love = Texting! I guess we better change the tone now, think positive, and assume everyone was so busy buying chocolate that there was no time left for cursive.  How sweet of them. I have to admit, nothing says &#8220;I Love You&#8221; in 2012 like a pulsing red emoticon heart and some C U 2nite&#8217;s sent from your Android. Wink.</p>
<p>It turns out we were using our phones for a lot more than texting in the week leading up to Valentine&#8217;s day, as well. TechCrunch <a href="http://techcrunch.com/2012/02/15/valentines-day-procrastination-fuels-mobile-usage-on-google/">posted</a> that from Feb. 7th &#8211; 14th, national chain restaurant searches online jumped significantly, with smartphone queries outpacing those from tablet and desktop devices. Who says that romance is dead? Thanks to our brainy phones, there were plenty of happy couples leaving Outback and Chili&#8217;s last night, with love alive and well!</p>
<p>At the office, we enjoy looking at data and visualizing trends. When holidays come around, it seems clear that we lean on technology to help us pick up the slack and increase convenience in our lives. Nothing gets you the stink eye from your significant other like a botched reservation or spaced date, so we text and Google search until we&#8217;ve figured something out! Perfect.</p>
<p>With texting getting more and more popular, we all have our reasons for increased usage. In the Zipwhip office, the enabler is &#8220;discretionary texting.&#8221; See, we&#8217;ve taken text messaging to the cloud, so when our CEO walks in, it looks like we&#8217;re working on spreadsheets, when we&#8217;re actually sending texts (Shhh!) with our <em>own </em>mobile number. It may be time for a texting intervention here at HQ. Tell us why texting from a desktop or tablet makes <em>your</em> day easier. Your secret&#8217;s safe with us!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=93&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2012/02/15/does-cupid-text-message-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>

		<media:content url="http://zipwhip.files.wordpress.com/2012/02/linkedin-photo-shoot-0121.jpg?w=300" medium="image">
			<media:title type="html">LinkedIn Photo Shoot 012</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: Using the Zipwhip API in Java to Popup Your Text Messages in a Bubble Window</title>
		<link>http://zipwhip.wordpress.com/2011/07/17/tutorial-using-the-zipwhip-api-in-java-to-popup-your-text-messages-in-a-bubble-window/</link>
		<comments>http://zipwhip.wordpress.com/2011/07/17/tutorial-using-the-zipwhip-api-in-java-to-popup-your-text-messages-in-a-bubble-window/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 20:10:53 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">https://zipwhip.wordpress.com/?p=75</guid>
		<description><![CDATA[I wrote a couple of posts about sending and receiving text messages via the Zipwhip API. Those posts culminated in console output showing you the results of sending or receiving. In this post I’m going to take things further and actually have a slick looking bubble popup on your desktop showing you your text message [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=75&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote a couple of posts about <a href="https://zipwhip.wordpress.com/2011/06/19/tutorial-using-the-zipwhip-api-in-java/">sending</a> and <a href="https://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/">receiving</a> text messages via the Zipwhip API. Those posts culminated in console output showing you the results of sending or receiving. In this post I’m going to take things further and actually have a slick looking bubble popup on your desktop showing you your text message as it comes in to the Zipwhip Cloud in real-time. The results will look something like below.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb.png" width="232" height="225"></a></p>
<p>Watch the video below to check out how cool the bubble looks as it fades in and out.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/ZipwhipBubbleDemo.swf"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_25.png" width="244" height="212"></a></p>
<p>We are going to create a new Eclipse project from scratch. Let’s call it ZipwhipBubble. Go into Eclipse and start a new project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_3.png" width="482" height="54"></a></p>
<p>Call the project ZipwhipBubble.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_4.png" width="192" height="244"></a></p>
<p>The source tab can be left with the defaults.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_5.png" width="192" height="244"></a></p>
<p>On the Libraries tab make sure to add the 3 JARs that we used in the previous posts including Log4j, SLF4j, and of course the most important library—the Zipwhip API JAR. The easiest way to do this is to just download the zip file below of this entire project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/ZipwhipBubble.zip">ZipwhipBubble.zip</a> 1.1 MB </p>
<p>The contents of the zip file are as follows:</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_26.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_25.png" width="227" height="244"></a></p>
<p>After having downloaded the above zip file, you can add the libraries from the JARs folder into the Libraries tab. Your tab should look like the screenshot below.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_6.png" width="192" height="244"></a></p>
<p>Click Finish. You should now have a new project like the window below.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_7.png" width="244" height="184"></a></p>
<p>You need to add your first class to the project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_8.png" width="388" height="134"></a></p>
<p>Give the class the name “Main” and give it a package like “com.yourcompany.zw”. Of course set yourcompany to your company.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_9.png" width="209" height="244"></a></p>
<p>You will see a code window that’s mostly empty like below. </p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_10.png" width="244" height="184"></a></p>
<p>Now paste the following code into your window so you get a full class ready to go without you having to do any of the hard work because I did it all for you. You can also download the full Zip file of this project from the top of this posting that contains all of the JARs, source code, and images for the project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/Main.java">Main.java</a> 4.8 KB</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">package</span> com.yourcompany.zw;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">import</span> org.apache.log4j.BasicConfigurator;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">import</span> org.apache.log4j.Level;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">import</span> org.apache.log4j.Logger;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">import</span> com.zipwhip.signals.dto.Message;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.DefaultZipwhipSubscriptionClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.HttpConnection;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.signals.JsonSocketSignalClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">import</span> com.zipwhip.signals.Signal;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span> <span style="color:#0000ff;">import</span> com.zipwhip.signals.SignalObserver;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> Main {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span> <span style="color:#008000;">     * @param args</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> main(String[] args) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>         <span style="color:#008000;">// Setup logging</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>         <span style="color:#0000ff;">final</span> Logger log = Logger.getLogger(Main.<span style="color:#0000ff;">class</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>         log.setLevel(Level.DEBUG);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>         BasicConfigurator.configure();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span>         HttpConnection connection = <span style="color:#0000ff;">new</span> HttpConnection();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>         connection.setDebug(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span>         String mobileNumber = <span style="color:#006080;">"3135551234"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span>         String password = <span style="color:#006080;">"mypassword"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum32">  32:</span>             <span style="color:#008000;">// This method will send a login request to the Zipwhip network and</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum33">  33:</span>             <span style="color:#008000;">// if succcessful you will get a sesionKey set in your connection object</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum34">  34:</span>             <span style="color:#008000;">// Watch out that you don't run "requestLogin()" too much because if you </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum35">  35:</span>             <span style="color:#008000;">// create more than 50 sessionKeys within 1 day you will no longer be able </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum36">  36:</span>             <span style="color:#008000;">// to get a key for 24 hours.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum37">  37:</span>             <span style="color:#008000;">connection.requestLogin(mobileNumber, password);</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum38">  38:</span>             //connection.setSessionKey(<span style="color:#006080;">"2ecfd63-4c57-4aa6-64a0-b0f120a1677a:1"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum39">  39:</span>             connection.apiVersion = <span style="color:#006080;">"/"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum40">  40:</span>             log.info(<span style="color:#006080;">"Successfully authenticated. Your sessionKey is:"</span> + connection.getSessionKey());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum41">  41:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum42">  42:</span>         } <span style="color:#0000ff;">catch</span> (Exception e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum43">  43:</span>             log.fatal(<span style="color:#006080;">"Failed to authenticate and get sessionKey to Zipwhip network."</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum44">  44:</span>             log.fatal(e);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum45">  45:</span>             <span style="color:#0000ff;">return</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum46">  46:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum47">  47:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum48">  48:</span>         DefaultZipwhipSubscriptionClient zipwhipSubscrClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum49">  49:</span>         JsonSocketSignalClient signalClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum50">  50:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum51">  51:</span>         <span style="color:#008000;">// This will create a new client object that allows you to perform</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum52">  52:</span>         <span style="color:#008000;">// other tasks against the Zipwhip network once you have created </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum53">  53:</span>         <span style="color:#008000;">// an authenticated connection, i.e. have a sessionKey to communicate</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum54">  54:</span>         <span style="color:#008000;">// to the Zipwhip network over.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum55">  55:</span>         zipwhipSubscrClient = <span style="color:#0000ff;">new</span> DefaultZipwhipSubscriptionClient(connection);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum56">  56:</span>         log.info(<span style="color:#006080;">"Just created our Default Client. Uses HTTP to connect to Zipwhip network."</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum57">  57:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum58">  58:</span>         <span style="color:#008000;">// We will create our socket connection as well. You still need an HTTP connection because</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum59">  59:</span>         <span style="color:#008000;">// the Zipwhip API uses HTTP calls to authenticate the socket connection.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum60">  60:</span>         signalClient = <span style="color:#0000ff;">new</span> JsonSocketSignalClient(zipwhipSubscrClient);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum61">  61:</span>         log.info(<span style="color:#006080;">"Just created our Socket always-connected client. Uses TCP/IP sockets to connect to Zipwhip network."</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum62">  62:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum63">  63:</span>         signalClient.addSignalObserver(<span style="color:#0000ff;">new</span> SignalObserver() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum64">  64:</span>             @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum65">  65:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> notifySignalReceived(Signal signal) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum66">  66:</span>                 log.debug(<span style="color:#006080;">"Signal received with uri "</span> + signal.uri);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum67">  67:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum68">  68:</span>                 <span style="color:#0000ff;">switch</span> (SignalUri.toSignalUri(signal.uri)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum69">  69:</span>                 <span style="color:#0000ff;">case</span> SIGNAL_MESSAGE_RECEIVE:</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum70">  70:</span>                     <span style="color:#008000;">// We got a message. Let's show it.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum71">  71:</span>                     <span style="color:#008000;">// The Message object is contained in the signal.content object</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum72">  72:</span>                     <span style="color:#008000;">// but you need to cast it.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum73">  73:</span>                     Message msg = (Message)signal.content;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum74">  74:</span>                     showIncomingMessageAlert(msg);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum75">  75:</span>                     <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum76">  76:</span>                 <span style="color:#0000ff;">case</span> SIGNAL_CONVERSATION_CHANGE:</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum77">  77:</span>                     <span style="color:#008000;">// Do nothing for now</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum78">  78:</span>                     <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum79">  79:</span>                 <span style="color:#0000ff;">default</span>:</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum80">  80:</span>                     <span style="color:#008000;">// Do nothing if we don't know the signal</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum81">  81:</span>                     <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum82">  82:</span>                 }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum83">  83:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum84">  84:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum85">  85:</span>             @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum86">  86:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> notifySignalProviderEvent(<span style="color:#0000ff;">boolean</span> isConnected, String message, <span style="color:#0000ff;">long</span> frameCount) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum87">  87:</span>                 log.debug(<span style="color:#006080;">"Reporting SignalProvider event: isConnected "</span> + isConnected + <span style="color:#006080;">", message: "</span> + message + <span style="color:#006080;">", frames: "</span> + frameCount);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum88">  88:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum89">  89:</span>         });</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum90">  90:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum91">  91:</span>         signalClient.connect(connection.getSessionKey());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum92">  92:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum93">  93:</span>         log.info(<span style="color:#006080;">"Socket test will keep running on socket thread. Thanks for using Zipwhip."</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum94">  94:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum95">  95:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum96">  96:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> showIncomingMessageAlert(Message message) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum97">  97:</span>         Bubble bubble = <span style="color:#0000ff;">new</span> Bubble(message.sourceAddress, message.body, <span style="color:#006080;">"http://cloudtext.letsbobsled.com"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum98">  98:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum99">  99:</span> }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum100"> 100:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum101"> 101:</span> <span style="color:#0000ff;">enum</span> SignalUri</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum102"> 102:</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum103"> 103:</span>     <span style="color:#008000;">/*</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum104"> 104:</span> <span style="color:#008000;">     * /signal/message/progress</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum105"> 105:</span> <span style="color:#008000;">     * /signal/messageProgress/messageProgress</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum106"> 106:</span> <span style="color:#008000;">     * /signal/message/send</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum107"> 107:</span> <span style="color:#008000;">     * /signal/message/receive</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum108"> 108:</span> <span style="color:#008000;">     * /signal/message/read</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum109"> 109:</span> <span style="color:#008000;">     * /signal/message/delete</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum110"> 110:</span> <span style="color:#008000;">     * /signal/conversation/change</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum111"> 111:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum112"> 112:</span>     SIGNAL_MESSAGE_RECEIVE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum113"> 113:</span>     SIGNAL_MESSAGE_PROGRESS,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum114"> 114:</span>     SIGNAL_MESSAGE_READ,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum115"> 115:</span>     SIGNAL_MESSAGE_DELETE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum116"> 116:</span>     SIGNAL_MESSAGEPROGRESS_MESSAGEPROGRESS,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum117"> 117:</span>     SIGNAL_CONVERSATION_CHANGE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum118"> 118:</span>     SIGNAL_CONTACT_NEW,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum119"> 119:</span>     SIGNAL_CONTACT_SAVE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum120"> 120:</span>     SIGNAL_CONTACT_DELETE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum121"> 121:</span>     NOVALUE;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum122"> 122:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum123"> 123:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> SignalUri toSignalUri(String str)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum124"> 124:</span>     {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum125"> 125:</span>         <span style="color:#008000;">// We are going to use Java's valueOf method, so</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum126"> 126:</span>         <span style="color:#008000;">// we need to cleanup the URI string first</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum127"> 127:</span>         <span style="color:#008000;">// Get rid of first slash</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum128"> 128:</span>         String str2 = str.substring(1, str.length());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum129"> 129:</span>         <span style="color:#008000;">// convert slashes to underscores</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum130"> 130:</span>         str2 = str2.replaceAll(<span style="color:#006080;">"/"</span>, <span style="color:#006080;">"_"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum131"> 131:</span>         <span style="color:#008000;">// go all upper case</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum132"> 132:</span>         str2 = str2.toUpperCase();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum133"> 133:</span>  </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum134"> 134:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum135"> 135:</span>             <span style="color:#0000ff;">return</span> valueOf(str2);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum136"> 136:</span>         } </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum137"> 137:</span>         <span style="color:#0000ff;">catch</span> (Exception ex) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum138"> 138:</span>             System.out.println(<span style="color:#006080;">"Found no match for SignalURI:"</span> + str);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum139"> 139:</span>             <span style="color:#0000ff;">return</span> NOVALUE;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum140"> 140:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum141"> 141:</span>     }   </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum142"> 142:</span> }</pre>
</div>
</div>
<p>You will see that once you paste this code in you will have one error. You need to get the Bubble class that I created for this project. </p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_11.png" width="513" height="61"></a></p>
<p>The Bubble class takes care of all of the details of displaying a nice looking bubble on your desktop. All you have to do is create a bubble and pass it the mobile number, the text message, and a redirection URL to actually reply to the message. There are numerous web apps on the Internet that use the Zipwhip cloud so it is up to you to pick the URL that is appropriate.</p>
<p>Let’s go ahead and add our Bubble class to the project. Right click on the “com.yourcompany.zw” package name and choose New –&gt; Class from the menu.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_12.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_12.png" width="540" height="174"></a></p>
<p>Call the class Bubble.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_13.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_13.png" width="209" height="244"></a></p>
<p>You will get a nice raw class like below.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_14.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_14.png" width="244" height="163"></a></p>
<p>Go ahead and paste in all of my hard work from my Bubble class. There’s a good deal of code in this class. The code is below. You can also download the file if you want. It’s below or it’s in the main Zip file linked to earlier in this posting.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/Bubble.java">Bubble.java</a> 29.4 KB</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">package</span> com.yourcompany.zw;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">import</span> java.awt.AlphaComposite;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">import</span> java.awt.BorderLayout;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">import</span> java.awt.Color;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#0000ff;">import</span> java.awt.Container;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">import</span> java.awt.Dimension;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#0000ff;">import</span> java.awt.Font;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">import</span> java.awt.GradientPaint;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span> <span style="color:#0000ff;">import</span> java.awt.Graphics;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#0000ff;">import</span> java.awt.Graphics2D;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span> <span style="color:#0000ff;">import</span> java.awt.GraphicsConfiguration;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span> <span style="color:#0000ff;">import</span> java.awt.Point;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span> <span style="color:#0000ff;">import</span> java.awt.Toolkit;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span> <span style="color:#0000ff;">import</span> java.awt.Transparency;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span> <span style="color:#0000ff;">import</span> java.awt.event.ActionEvent;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span> <span style="color:#0000ff;">import</span> java.awt.event.ActionListener;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span> <span style="color:#0000ff;">import</span> java.awt.event.MouseAdapter;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span> <span style="color:#0000ff;">import</span> java.awt.event.MouseEvent;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span> <span style="color:#0000ff;">import</span> java.awt.event.MouseListener;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span> <span style="color:#0000ff;">import</span> java.awt.event.MouseMotionAdapter;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span> <span style="color:#0000ff;">import</span> java.awt.event.MouseMotionListener;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span> <span style="color:#0000ff;">import</span> java.awt.geom.AffineTransform;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span> <span style="color:#0000ff;">import</span> java.awt.geom.Rectangle2D;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span> <span style="color:#0000ff;">import</span> java.awt.image.BufferedImage;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span> <span style="color:#0000ff;">import</span> java.io.File;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span> <span style="color:#0000ff;">import</span> java.io.IOException;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span> <span style="color:#0000ff;">import</span> java.net.URI;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span> <span style="color:#0000ff;">import</span> java.net.URISyntaxException;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span> <span style="color:#0000ff;">import</span> java.net.URL;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span> <span style="color:#0000ff;">import</span> java.util.ArrayList;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum32">  32:</span> <span style="color:#0000ff;">import</span> java.util.Arrays;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum33">  33:</span> <span style="color:#0000ff;">import</span> java.util.HashMap;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum34">  34:</span> <span style="color:#0000ff;">import</span> java.util.HashSet;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum35">  35:</span> <span style="color:#0000ff;">import</span> java.util.List;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum36">  36:</span> <span style="color:#0000ff;">import</span> java.util.Map;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum37">  37:</span> <span style="color:#0000ff;">import</span> java.util.Set;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum38">  38:</span> <span style="color:#0000ff;">import</span> java.util.regex.Pattern;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum39">  39:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum40">  40:</span> <span style="color:#0000ff;">import</span> javax.imageio.ImageIO;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum41">  41:</span> <span style="color:#0000ff;">import</span> javax.swing.ImageIcon;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum42">  42:</span> <span style="color:#0000ff;">import</span> javax.swing.JButton;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum43">  43:</span> <span style="color:#0000ff;">import</span> javax.swing.JComponent;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum44">  44:</span> <span style="color:#0000ff;">import</span> javax.swing.JDialog;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum45">  45:</span> <span style="color:#0000ff;">import</span> javax.swing.JFrame;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum46">  46:</span> <span style="color:#0000ff;">import</span> javax.swing.JPanel;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum47">  47:</span> <span style="color:#0000ff;">import</span> javax.swing.Timer;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum48">  48:</span> <span style="color:#0000ff;">import</span> javax.swing.UIManager;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum49">  49:</span> <span style="color:#0000ff;">import</span> javax.swing.text.AbstractDocument;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum50">  50:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum51">  51:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> Bubble <span style="color:#0000ff;">extends</span> JDialog {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum52">  52:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum53">  53:</span>     <span style="color:#008000;">// this code is static to manage the number of windows that are open</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum54">  54:</span>     <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">int</span> numOpen;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum55">  55:</span>     <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">int</span> getOpen() { <span style="color:#0000ff;">return</span> numOpen; }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum56">  56:</span>     <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> windowOpen() { numOpen++; }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum57">  57:</span>     <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> windowClose() { numOpen--; }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum58">  58:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum59">  59:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">int</span> X=0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum60">  60:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">int</span> Y=0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum61">  61:</span>     <span style="color:#0000ff;">private</span> String fromMobileNumber;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum62">  62:</span>     <span style="color:#0000ff;">private</span> String message;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum63">  63:</span>     <span style="color:#0000ff;">private</span> String replyUrl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum64">  64:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">boolean</span> toFade = true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum65">  65:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">float</span> currOpacity;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum66">  66:</span>     <span style="color:#0000ff;">private</span> Timer fadeInTimer;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum67">  67:</span>     <span style="color:#0000ff;">private</span> Timer fadeOutTimer;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum68">  68:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum69">  69:</span>     javax.swing.JTextPane jTextPaneTxtMsg;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum70">  70:</span>     AbstractDocument doc;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum71">  71:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum72">  72:</span>     <span style="color:#0000ff;">public</span> Bubble(String fromMobileNumber, String message, String replyUrl) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum73">  73:</span>         <span style="color:#0000ff;">this</span>(fromMobileNumber, message, replyUrl, true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum74">  74:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum75">  75:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum76">  76:</span>     <span style="color:#0000ff;">public</span> Bubble(String fromMobileNumber, String message, String replyUrl, <span style="color:#0000ff;">boolean</span> toFade) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum77">  77:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum78">  78:</span>         <span style="color:#008000;">// initialize properties</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum79">  79:</span>         setFromMobileNumber(fromMobileNumber);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum80">  80:</span>         setMessage(message);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum81">  81:</span>         setReplyUrl(replyUrl);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum82">  82:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum83">  83:</span>         <span style="color:#008000;">// initialize the UI of the bubble</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum84">  84:</span>         init();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum85">  85:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum86">  86:</span>         <span style="color:#008000;">// set the location of where this bubble will be shown</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum87">  87:</span>         Dimension ourDim = Toolkit.getDefaultToolkit().getScreenSize();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum88">  88:</span>         <span style="color:#0000ff;">this</span>.setLocation(</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum89">  89:</span>                 (<span style="color:#0000ff;">int</span>)ourDim.getWidth() - <span style="color:#0000ff;">this</span>.getWidth() - 10, </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum90">  90:</span>                 0 + ((<span style="color:#0000ff;">this</span>.getHeight() + -20) * getOpen()));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum91">  91:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum92">  92:</span>         <span style="color:#008000;">// increment how many bubbles are open</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum93">  93:</span>         windowOpen();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum94">  94:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum95">  95:</span>         <span style="color:#008000;">// ok, show it finally</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum96">  96:</span>         <span style="color:#0000ff;">this</span>.setVisible(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum97">  97:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum98">  98:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum99">  99:</span>     <span style="color:#008000;">// Getters/setters</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum100"> 100:</span>     <span style="color:#0000ff;">public</span> String getFromMobileNumber() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum101"> 101:</span>         <span style="color:#0000ff;">return</span> StringUtil.format(fromMobileNumber, <span style="color:#006080;">"(###) ###-####"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum102"> 102:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum103"> 103:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum104"> 104:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setFromMobileNumber(String fromMobileNumber) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum105"> 105:</span>         <span style="color:#0000ff;">this</span>.fromMobileNumber = fromMobileNumber;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum106"> 106:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum107"> 107:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum108"> 108:</span>     <span style="color:#0000ff;">public</span> String getMessage() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum109"> 109:</span>         <span style="color:#0000ff;">return</span> message;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum110"> 110:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum111"> 111:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum112"> 112:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setMessage(String message) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum113"> 113:</span>         <span style="color:#0000ff;">this</span>.message = message;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum114"> 114:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum115"> 115:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum116"> 116:</span>     <span style="color:#0000ff;">public</span> String getReplyUrl() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum117"> 117:</span>         <span style="color:#0000ff;">return</span> replyUrl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum118"> 118:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum119"> 119:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum120"> 120:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setReplyUrl(String replyUrl) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum121"> 121:</span>         <span style="color:#0000ff;">this</span>.replyUrl = replyUrl;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum122"> 122:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum123"> 123:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum124"> 124:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">boolean</span> isToFade() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum125"> 125:</span>         <span style="color:#0000ff;">return</span> toFade;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum126"> 126:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum127"> 127:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setToFade(<span style="color:#0000ff;">boolean</span> toFade) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum128"> 128:</span>         <span style="color:#0000ff;">this</span>.toFade = toFade;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum129"> 129:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum130"> 130:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum131"> 131:</span>     <span style="color:#008000;">// Initialize the GUI</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum132"> 132:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> init() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum133"> 133:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum134"> 134:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum135"> 135:</span>             <span style="color:#008000;">// When JFrame or JDialog</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum136"> 136:</span>             <span style="color:#0000ff;">this</span>.setUndecorated(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum137"> 137:</span>             <span style="color:#0000ff;">this</span>.setModal(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum138"> 138:</span>             <span style="color:#0000ff;">this</span>.setFocusableWindowState(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum139"> 139:</span>             <span style="color:#0000ff;">this</span>.setAlwaysOnTop(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum140"> 140:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum141"> 141:</span>             <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum142"> 142:</span>                 UIManager.setLookAndFeel(<span style="color:#006080;">"com.sun.java.swing.plaf.windows.WindowsLookAndFeel"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum143"> 143:</span>             } <span style="color:#0000ff;">catch</span> (Exception evt) {}</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum144"> 144:</span>            </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum145"> 145:</span>             <span style="color:#008000;">// Get bg image</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum146"> 146:</span>             <span style="color:#0000ff;">final</span> BufferedImage backgroundImg = ImageIO.read(getClass().getResource(<span style="color:#006080;">"/resources/riser_shd.png"</span>));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum147"> 147:</span>                 </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum148"> 148:</span>             <span style="color:#008000;">// Set icon &amp; title</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum149"> 149:</span>             <span style="color:#0000ff;">final</span> BufferedImage z = ImageIO.read(getClass().getResource(<span style="color:#006080;">"/resources/z.png"</span>));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum150"> 150:</span>             ((java.awt.Frame)<span style="color:#0000ff;">this</span>.getOwner()).setIconImage(z);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum151"> 151:</span>             <span style="color:#0000ff;">this</span>.setTitle(<span style="color:#0000ff;">this</span>.getFromMobileNumber() + <span style="color:#006080;">": "</span> + <span style="color:#0000ff;">this</span>.getMessage());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum152"> 152:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum153"> 153:</span>             <span style="color:#008000;">// Set layout</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum154"> 154:</span>             <span style="color:#0000ff;">this</span>.setLayout(<span style="color:#0000ff;">new</span> BorderLayout());    </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum155"> 155:</span>             JPanel mainPanel = <span style="color:#0000ff;">new</span> JPanel(<span style="color:#0000ff;">new</span> BorderLayout()) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum156"> 156:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum157"> 157:</span>                 <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> <span style="color:#0000ff;">long</span> serialVersionUID = 1L;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum158"> 158:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum159"> 159:</span>                 <span style="color:#008000;">// The paintComponent override let's us make the entire</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum160"> 160:</span>                 <span style="color:#008000;">// window transparent on the desktop so we get a cool effect</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum161"> 161:</span>                 @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum162"> 162:</span>                 <span style="color:#0000ff;">protected</span> <span style="color:#0000ff;">void</span> paintComponent(Graphics g) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum163"> 163:</span>                     Graphics2D g2d = (Graphics2D) g.create();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum164"> 164:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum165"> 165:</span>                     <span style="color:#008000;">// code from</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum166"> 166:</span>                     <span style="color:#008000;">// http://weblogs.java.net/blog/campbell/archive/2006/07/java_2d_tricker.html</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum167"> 167:</span>                     <span style="color:#0000ff;">int</span> width = backgroundImg.getWidth();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum168"> 168:</span>                     <span style="color:#0000ff;">int</span> height = backgroundImg.getHeight();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum169"> 169:</span>                     GraphicsConfiguration gc = g2d.getDeviceConfiguration();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum170"> 170:</span>                     BufferedImage img = gc.createCompatibleImage(</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum171"> 171:</span>                         width,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum172"> 172:</span>                         height,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum173"> 173:</span>                         Transparency.TRANSLUCENT);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum174"> 174:</span>                     Graphics2D g2 = img.createGraphics();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum175"> 175:</span>                     g2.setComposite(AlphaComposite.Src);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum176"> 176:</span>                     g2.drawImage(backgroundImg, 0, 0, null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum177"> 177:</span>                     g2.dispose();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum178"> 178:</span>                     g2d.drawImage(img, 0, 0, <span style="color:#0000ff;">this</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum179"> 179:</span>                     g2d.dispose();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum180"> 180:</span>                 }    </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum181"> 181:</span>             };</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum182"> 182:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum183"> 183:</span>             <span style="color:#008000;">// Setup the window</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum184"> 184:</span>             <span style="color:#0000ff;">final</span> JDialog wnd = <span style="color:#0000ff;">this</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum185"> 185:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum186"> 186:</span>             <span style="color:#008000;">// This is the phone number and textarea message panel</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum187"> 187:</span>             javax.swing.JPanel jPanelAll = <span style="color:#0000ff;">new</span> javax.swing.JPanel();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum188"> 188:</span>             javax.swing.JLabel jLabelMobileNum = <span style="color:#0000ff;">new</span> javax.swing.JLabel();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum189"> 189:</span>             <span style="color:#0000ff;">this</span>.jTextPaneTxtMsg = <span style="color:#0000ff;">new</span> javax.swing.JTextPane();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum190"> 190:</span>             JButton jButtonClose = <span style="color:#0000ff;">new</span> javax.swing.JButton();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum191"> 191:</span>             JButton jButtonReply = <span style="color:#0000ff;">new</span> javax.swing.JButton();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum192"> 192:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum193"> 193:</span>             jPanelAll.setOpaque(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum194"> 194:</span>             jPanelAll.setDoubleBuffered(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum195"> 195:</span>             jPanelAll.setName(<span style="color:#006080;">"jPanelAll"</span>); <span style="color:#008000;">// NOI18N</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum196"> 196:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum197"> 197:</span>             jLabelMobileNum.setFont( <span style="color:#0000ff;">new</span> Font(null, Font.BOLD, 14));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum198"> 198:</span>             jLabelMobileNum.setForeground(<span style="color:#0000ff;">new</span> Color(67, 74, 84));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum199"> 199:</span>             jLabelMobileNum.setText(getFromMobileNumber());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum200"> 200:</span>             jLabelMobileNum.setName(<span style="color:#006080;">"jLabelMobileNum"</span>); <span style="color:#008000;">// NOI18N</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum201"> 201:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum202"> 202:</span>             jTextPaneTxtMsg.setBorder(null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum203"> 203:</span>             jTextPaneTxtMsg.setEditable(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum204"> 204:</span>             jTextPaneTxtMsg.setFont( <span style="color:#0000ff;">new</span> Font(null, Font.PLAIN, 12));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum205"> 205:</span>             jTextPaneTxtMsg.setOpaque(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum206"> 206:</span>             jTextPaneTxtMsg.setDoubleBuffered(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum207"> 207:</span>             jTextPaneTxtMsg.setText(getMessage());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum208"> 208:</span>             jTextPaneTxtMsg.setName(<span style="color:#006080;">"jTextPane1"</span>); <span style="color:#008000;">// NOI18N</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum209"> 209:</span>             jTextPaneTxtMsg.setCaretPosition(0);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum210"> 210:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum211"> 211:</span>             javax.swing.JScrollPane jScrollPane1 = <span style="color:#0000ff;">new</span> javax.swing.JScrollPane(jTextPaneTxtMsg);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum212"> 212:</span>             jScrollPane1.getViewport().setOpaque(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum213"> 213:</span>             jScrollPane1.getViewport().setDoubleBuffered(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum214"> 214:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum215"> 215:</span>             jScrollPane1.setBorder(null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum216"> 216:</span>             jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum217"> 217:</span>             jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum218"> 218:</span>             jScrollPane1.setOpaque(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum219"> 219:</span>             jScrollPane1.setDoubleBuffered(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum220"> 220:</span>             jScrollPane1.setWheelScrollingEnabled(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum221"> 221:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum222"> 222:</span>             BufferedImage riserSpriteBtnImg = ImageIO.read(getClass().getResource(<span style="color:#006080;">"/resources/risergang.png"</span>));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum223"> 223:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum224"> 224:</span>             <span style="color:#008000;">// Define the close button</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum225"> 225:</span>             jButtonClose.setIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(1,1,14,14)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum226"> 226:</span>             jButtonClose.setRolloverIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(16,1,14,14)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum227"> 227:</span>             jButtonClose.setPressedIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(31,1,14,14)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum228"> 228:</span>             jButtonClose.setBorder(null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum229"> 229:</span>             jButtonClose.setBorderPainted(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum230"> 230:</span>             jButtonClose.setContentAreaFilled(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum231"> 231:</span>             jButtonClose.addActionListener(<span style="color:#0000ff;">new</span> ActionListener() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum232"> 232:</span>                 @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum233"> 233:</span>                 <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> actionPerformed(ActionEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum234"> 234:</span>                     wnd.setVisible(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum235"> 235:</span>                 }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum236"> 236:</span>             });</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum237"> 237:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum238"> 238:</span>             <span style="color:#008000;">// Define the reply button</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum239"> 239:</span>             jButtonReply.setIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(0,16,58,30)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum240"> 240:</span>             jButtonReply.setRolloverIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(0,47,58,30)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum241"> 241:</span>             jButtonReply.setPressedIcon(<span style="color:#0000ff;">new</span> ImageIcon(riserSpriteBtnImg.getSubimage(0,78,58,30)));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum242"> 242:</span>             jButtonReply.setBorder(null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum243"> 243:</span>             jButtonReply.setBorderPainted(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum244"> 244:</span>             jButtonReply.setContentAreaFilled(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum245"> 245:</span>             jButtonReply.addActionListener(<span style="color:#0000ff;">new</span> ActionListener() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum246"> 246:</span>                 @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum247"> 247:</span>                 <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> actionPerformed(ActionEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum248"> 248:</span>                     openUri(getReplyUrl());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum249"> 249:</span>                     wnd.setVisible(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum250"> 250:</span>                 }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum251"> 251:</span>             });</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum252"> 252:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum253"> 253:</span>             <span style="color:#008000;">// Do the layout positioning using horiz/vert groups        </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum254"> 254:</span>             javax.swing.GroupLayout jPanel2Layout = <span style="color:#0000ff;">new</span> javax.swing.GroupLayout(jPanelAll);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum255"> 255:</span>             jPanelAll.setLayout(jPanel2Layout);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum256"> 256:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum257"> 257:</span>             jPanel2Layout.setHorizontalGroup(</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum258"> 258:</span>                 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum259"> 259:</span>                 .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum260"> 260:</span>                     .addGap(32)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum261"> 261:</span>                     .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum262"> 262:</span>                         .addComponent(jLabelMobileNum)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum263"> 263:</span>                         .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum264"> 264:</span>                     )</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum265"> 265:</span>                     .addContainerGap(73, Short.MAX_VALUE))</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum266"> 266:</span>                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum267"> 267:</span>                     .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum268"> 268:</span>                         .addGap(169)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum269"> 269:</span>                         .addComponent(jButtonClose, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum270"> 270:</span>                         .addContainerGap(261, Short.MAX_VALUE)))</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum271"> 271:</span>                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum272"> 272:</span>                     .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum273"> 273:</span>                         .addGap(128)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum274"> 274:</span>                         .addComponent(jButtonReply, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum275"> 275:</span>                         .addContainerGap(251, Short.MAX_VALUE)))</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum276"> 276:</span>             );</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum277"> 277:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum278"> 278:</span>             jPanel2Layout.setVerticalGroup(</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum279"> 279:</span>                 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum280"> 280:</span>                 .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum281"> 281:</span>                     .addGap(32)    </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum282"> 282:</span>                     .addComponent(jLabelMobileNum)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum283"> 283:</span>                     .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum284"> 284:</span>                     .addComponent(false, jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum285"> 285:</span>                     .addContainerGap(64, Short.MAX_VALUE))</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum286"> 286:</span>                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum287"> 287:</span>                     .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum288"> 288:</span>                         .addGap(28)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum289"> 289:</span>                         .addComponent(jButtonClose, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum290"> 290:</span>                         .addContainerGap(300, Short.MAX_VALUE)))</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum291"> 291:</span>                 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum292"> 292:</span>                     .addGroup(jPanel2Layout.createSequentialGroup()</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum293"> 293:</span>                         .addGap(168)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum294"> 294:</span>                         .addComponent(jButtonReply, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum295"> 295:</span>                         .addContainerGap(146, Short.MAX_VALUE)))</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum296"> 296:</span>             );</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum297"> 297:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum298"> 298:</span>             <span style="color:#008000;">// End phone/message panel</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum299"> 299:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum300"> 300:</span>             <span style="color:#008000;">// Setup final main paenl</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum301"> 301:</span>             mainPanel.add(jPanelAll, BorderLayout.WEST);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum302"> 302:</span>             mainPanel.setDoubleBuffered(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum303"> 303:</span>             mainPanel.setOpaque(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum304"> 304:</span>             <span style="color:#0000ff;">this</span>.add(mainPanel, BorderLayout.CENTER);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum305"> 305:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum306"> 306:</span>             <span style="color:#0000ff;">this</span>.setAlwaysOnTop(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum307"> 307:</span>             <span style="color:#0000ff;">this</span>.setSize(216, 234);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum308"> 308:</span>             <span style="color:#0000ff;">this</span>.setLocationRelativeTo(null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum309"> 309:</span>             com.sun.awt.AWTUtilities.setWindowOpaque(<span style="color:#0000ff;">this</span>, false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum310"> 310:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum311"> 311:</span>             <span style="color:#008000;">// Watch mouse movements and clicks to allow dragging of window</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum312"> 312:</span>             addMouseListener(<span style="color:#0000ff;">new</span> MouseAdapter()</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum313"> 313:</span>             {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum314"> 314:</span>                 <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mousePressed(MouseEvent e)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum315"> 315:</span>                 {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum316"> 316:</span>                     <span style="color:#008000;">// Check for double-click</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum317"> 317:</span>                     <span style="color:#0000ff;">if</span> (e.getClickCount() &gt;= 2) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum318"> 318:</span>                         <span style="color:#008000;">// Open the website to let them reply</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum319"> 319:</span>                         openUri(getReplyUrl());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum320"> 320:</span>                         setVisible(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum321"> 321:</span>                     } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum322"> 322:</span>                         <span style="color:#008000;">// Do drag operation</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum323"> 323:</span>                         X=e.getX();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum324"> 324:</span>                         Y=e.getY();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum325"> 325:</span>                     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum326"> 326:</span>                 }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum327"> 327:</span>                 </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum328"> 328:</span>             });</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum329"> 329:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum330"> 330:</span>             addMouseMotionListener(<span style="color:#0000ff;">new</span> MouseMotionAdapter()</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum331"> 331:</span>             {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum332"> 332:</span>                 <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseDragged(MouseEvent e)</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum333"> 333:</span>                 {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum334"> 334:</span>                     setLocation(getLocation().x+(e.getX()-X),getLocation().y+(e.getY()-Y));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum335"> 335:</span>                 }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum336"> 336:</span>             });</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum337"> 337:</span>             </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum338"> 338:</span>         } <span style="color:#0000ff;">catch</span> (IOException e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum339"> 339:</span>             e.printStackTrace();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum340"> 340:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum341"> 341:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum342"> 342:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum343"> 343:</span>     @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum344"> 344:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setVisible(<span style="color:#0000ff;">boolean</span> b) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum345"> 345:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum346"> 346:</span>         <span style="color:#008000;">// Handle fading in or fading out</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum347"> 347:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum348"> 348:</span>         <span style="color:#008000;">// If setvisible is true</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum349"> 349:</span>         <span style="color:#0000ff;">if</span> (b) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum350"> 350:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum351"> 351:</span>             <span style="color:#008000;">// See if we need to fade in</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum352"> 352:</span>             <span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">this</span>.toFade) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum353"> 353:</span>                 <span style="color:#008000;">// mark the popup with 0% opacity</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum354"> 354:</span>                 <span style="color:#0000ff;">this</span>.currOpacity = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum355"> 355:</span>                 com.sun.awt.AWTUtilities.setWindowOpacity(<span style="color:#0000ff;">this</span>, 0.0f);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum356"> 356:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum357"> 357:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum358"> 358:</span>             <span style="color:#0000ff;">super</span>.setVisible(b);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum359"> 359:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum360"> 360:</span>             <span style="color:#0000ff;">final</span> JDialog popupWindow = <span style="color:#0000ff;">this</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum361"> 361:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum362"> 362:</span>             <span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">this</span>.toFade) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum363"> 363:</span>                 <span style="color:#008000;">// start fading in</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum364"> 364:</span>                 <span style="color:#0000ff;">this</span>.fadeInTimer = <span style="color:#0000ff;">new</span> Timer(50, <span style="color:#0000ff;">new</span> ActionListener() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum365"> 365:</span>                     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> actionPerformed(ActionEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum366"> 366:</span>                         currOpacity += 10;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum367"> 367:</span>                         <span style="color:#0000ff;">if</span> (currOpacity &lt;= 100) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum368"> 368:</span>                             com.sun.awt.AWTUtilities.setWindowOpacity(popupWindow,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum369"> 369:</span>                                     currOpacity / 100.0f);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum370"> 370:</span>                             <span style="color:#008000;">// workaround bug 6670649 - should call</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum371"> 371:</span>                             <span style="color:#008000;">// popupWindow.repaint() but that will not repaint the</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum372"> 372:</span>                             <span style="color:#008000;">// panel</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum373"> 373:</span>                             popupWindow.getContentPane().repaint();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum374"> 374:</span>                         } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum375"> 375:</span>                             currOpacity = 100;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum376"> 376:</span>                             fadeInTimer.stop();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum377"> 377:</span>                         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum378"> 378:</span>                     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum379"> 379:</span>                 });</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum380"> 380:</span>                 <span style="color:#0000ff;">this</span>.fadeInTimer.setRepeats(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum381"> 381:</span>                 <span style="color:#0000ff;">this</span>.fadeInTimer.start();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum382"> 382:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum383"> 383:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum384"> 384:</span>         } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum385"> 385:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum386"> 386:</span>             <span style="color:#008000;">// If setvisible is false</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum387"> 387:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum388"> 388:</span>             <span style="color:#008000;">// Handle fading out, if they want a fade</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum389"> 389:</span>             <span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">this</span>.toFade) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum390"> 390:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum391"> 391:</span>                 <span style="color:#008000;">// cancel fade-in if it's running.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum392"> 392:</span>                 <span style="color:#0000ff;">if</span> (<span style="color:#0000ff;">this</span>.fadeInTimer.isRunning())</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum393"> 393:</span>                     <span style="color:#0000ff;">this</span>.fadeInTimer.stop();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum394"> 394:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum395"> 395:</span>                 <span style="color:#0000ff;">final</span> Bubble popupWindow = <span style="color:#0000ff;">this</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum396"> 396:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum397"> 397:</span>                 <span style="color:#008000;">// start fading out</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum398"> 398:</span>                 <span style="color:#0000ff;">this</span>.fadeOutTimer = <span style="color:#0000ff;">new</span> Timer(50, <span style="color:#0000ff;">new</span> ActionListener() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum399"> 399:</span>                     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> actionPerformed(ActionEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum400"> 400:</span>                         currOpacity -= 10;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum401"> 401:</span>                         <span style="color:#0000ff;">if</span> (currOpacity &gt;= 0) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum402"> 402:</span>                             com.sun.awt.AWTUtilities.setWindowOpacity(popupWindow,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum403"> 403:</span>                                     currOpacity / 100.0f);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum404"> 404:</span>                             <span style="color:#008000;">// workaround bug 6670649 - should call</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum405"> 405:</span>                             <span style="color:#008000;">// popupWindow.repaint() but that will not repaint the</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum406"> 406:</span>                             <span style="color:#008000;">// panel</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum407"> 407:</span>                             popupWindow.getContentPane().repaint();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum408"> 408:</span>                         } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum409"> 409:</span>                             fadeOutTimer.stop();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum410"> 410:</span>                             popupWindow.setToFade(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum411"> 411:</span>                             popupWindow.setVisible(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum412"> 412:</span>                             currOpacity = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum413"> 413:</span>                         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum414"> 414:</span>                     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum415"> 415:</span>                 });</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum416"> 416:</span>                 <span style="color:#0000ff;">this</span>.fadeOutTimer.setRepeats(true);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum417"> 417:</span>                 <span style="color:#0000ff;">this</span>.fadeOutTimer.start();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum418"> 418:</span>                 </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum419"> 419:</span>             } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum420"> 420:</span>                 </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum421"> 421:</span>                 <span style="color:#008000;">// setVisible is being set to false and we're not in fadeout mode,</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum422"> 422:</span>                 <span style="color:#008000;">// so let's let the super handle</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum423"> 423:</span>                 <span style="color:#008000;">// it cuz we don't want to interfere if there's no fading going on</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum424"> 424:</span>                 windowClose();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum425"> 425:</span>                 <span style="color:#0000ff;">super</span>.setVisible(false);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum426"> 426:</span>                 <span style="color:#0000ff;">this</span>.removeAll();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum427"> 427:</span>                 <span style="color:#0000ff;">this</span>.dispose();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum428"> 428:</span>                 </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum429"> 429:</span>             }        </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum430"> 430:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum431"> 431:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum432"> 432:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum433"> 433:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> openUri(String url) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum434"> 434:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum435"> 435:</span>         <span style="color:#0000ff;">if</span>( !java.awt.Desktop.isDesktopSupported() ) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum436"> 436:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum437"> 437:</span>             System.err.println( <span style="color:#006080;">"Desktop is not supported (fatal)"</span> );</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum438"> 438:</span>             <span style="color:#0000ff;">return</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum439"> 439:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum440"> 440:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum441"> 441:</span>         java.awt.Desktop desktop = java.awt.Desktop.getDesktop();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum442"> 442:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum443"> 443:</span>         <span style="color:#0000ff;">if</span>( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum444"> 444:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum445"> 445:</span>             System.err.println( <span style="color:#006080;">"Desktop doesn't support the browse action (fatal)"</span> );</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum446"> 446:</span>             <span style="color:#0000ff;">return</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum447"> 447:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum448"> 448:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum449"> 449:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum450"> 450:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum451"> 451:</span>             java.net.URI uri = <span style="color:#0000ff;">new</span> java.net.URI( url );</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum452"> 452:</span>             desktop.browse( uri );</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum453"> 453:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum454"> 454:</span>         <span style="color:#0000ff;">catch</span> ( Exception e ) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum455"> 455:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum456"> 456:</span>             System.err.println( e.getMessage() );</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum457"> 457:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum458"> 458:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum459"> 459:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum460"> 460:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum461"> 461:</span> }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum462"> 462:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum463"> 463:</span> <span style="color:#0000ff;">class</span> MoveMouseListener <span style="color:#0000ff;">implements</span> MouseListener, MouseMotionListener {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum464"> 464:</span>     JComponent target;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum465"> 465:</span>     Point start_drag;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum466"> 466:</span>     Point start_loc;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum467"> 467:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum468"> 468:</span>     <span style="color:#0000ff;">public</span> MoveMouseListener(JComponent target) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum469"> 469:</span>         <span style="color:#0000ff;">this</span>.target = target;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum470"> 470:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum471"> 471:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum472"> 472:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> JFrame getFrame(Container target) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum473"> 473:</span>         <span style="color:#0000ff;">if</span> (target <span style="color:#0000ff;">instanceof</span> JFrame) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum474"> 474:</span>             <span style="color:#0000ff;">return</span> (JFrame) target;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum475"> 475:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum476"> 476:</span>         <span style="color:#0000ff;">return</span> getFrame(target.getParent());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum477"> 477:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum478"> 478:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum479"> 479:</span>     Point getScreenLocation(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum480"> 480:</span>         Point cursor = e.getPoint();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum481"> 481:</span>         Point target_location = <span style="color:#0000ff;">this</span>.target.getLocationOnScreen();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum482"> 482:</span>         <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">new</span> Point((<span style="color:#0000ff;">int</span>) (target_location.getX() + cursor.getX()),</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum483"> 483:</span>                 (<span style="color:#0000ff;">int</span>) (target_location.getY() + cursor.getY()));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum484"> 484:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum485"> 485:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum486"> 486:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseClicked(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum487"> 487:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum488"> 488:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum489"> 489:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseEntered(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum490"> 490:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum491"> 491:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum492"> 492:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseExited(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum493"> 493:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum494"> 494:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum495"> 495:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mousePressed(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum496"> 496:</span>         <span style="color:#0000ff;">this</span>.start_drag = <span style="color:#0000ff;">this</span>.getScreenLocation(e);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum497"> 497:</span>         <span style="color:#0000ff;">this</span>.start_loc = <span style="color:#0000ff;">this</span>.getFrame(<span style="color:#0000ff;">this</span>.target).getLocation();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum498"> 498:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum499"> 499:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum500"> 500:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseReleased(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum501"> 501:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum502"> 502:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum503"> 503:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseDragged(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum504"> 504:</span>         Point current = <span style="color:#0000ff;">this</span>.getScreenLocation(e);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum505"> 505:</span>         Point offset = <span style="color:#0000ff;">new</span> Point((<span style="color:#0000ff;">int</span>) current.getX() - (<span style="color:#0000ff;">int</span>) start_drag.getX(),</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum506"> 506:</span>                 (<span style="color:#0000ff;">int</span>) current.getY() - (<span style="color:#0000ff;">int</span>) start_drag.getY());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum507"> 507:</span>         JFrame frame = <span style="color:#0000ff;">this</span>.getFrame(target);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum508"> 508:</span>         Point new_location = <span style="color:#0000ff;">new</span> Point(</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum509"> 509:</span>                 (<span style="color:#0000ff;">int</span>) (<span style="color:#0000ff;">this</span>.start_loc.getX() + offset.getX()), (<span style="color:#0000ff;">int</span>) (<span style="color:#0000ff;">this</span>.start_loc</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum510"> 510:</span>                         .getY() + offset.getY()));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum511"> 511:</span>         frame.setLocation(new_location);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum512"> 512:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum513"> 513:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum514"> 514:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> mouseMoved(MouseEvent e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum515"> 515:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum516"> 516:</span> }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum517"> 517:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum518"> 518:</span> <span style="color:#0000ff;">class</span> StringUtil {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum519"> 519:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum520"> 520:</span>     <span style="color:#008000;">//private static final Logger logger = LoggerFactory.getLogger(StringUtil.class);</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum521"> 521:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum522"> 522:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> String EMPTY_STRING = <span style="color:#006080;">""</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum523"> 523:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> <span style="color:#0000ff;">int</span> MAX_MOBILE_NUMBER_DIGITS = 16; <span style="color:#008000;">// Finland being the longest we could find 99500-1-202-444-1212, plus a buffer...</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum524"> 524:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> List&lt;Character&gt; VALID_NUMBERS;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum525"> 525:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> List&lt;Character&gt; VALID_SPECIAL_CHARACTERS;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum526"> 526:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum527"> 527:</span>     <span style="color:#0000ff;">static</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum528"> 528:</span>         VALID_NUMBERS = Arrays.asList(<span style="color:#0000ff;">new</span> Character[] { <span style="color:#006080;">'0'</span>, <span style="color:#006080;">'1'</span>, <span style="color:#006080;">'2'</span>, <span style="color:#006080;">'3'</span>, <span style="color:#006080;">'4'</span>, <span style="color:#006080;">'5'</span>, <span style="color:#006080;">'6'</span>, <span style="color:#006080;">'7'</span>, <span style="color:#006080;">'8'</span>, <span style="color:#006080;">'9'</span> });</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum529"> 529:</span>         VALID_SPECIAL_CHARACTERS = Arrays.asList(<span style="color:#0000ff;">new</span> Character[]{<span style="color:#006080;">'!'</span>, <span style="color:#006080;">'@'</span>, <span style="color:#006080;">'#'</span>, <span style="color:#006080;">'$'</span>, <span style="color:#006080;">'%'</span>, <span style="color:#006080;">'^'</span>, <span style="color:#006080;">'&amp;'</span>, <span style="color:#006080;">'*'</span>, <span style="color:#006080;">'('</span>, <span style="color:#006080;">')'</span>, <span style="color:#006080;">'`'</span>, <span style="color:#006080;">'['</span>, <span style="color:#006080;">']'</span>, <span style="color:#006080;">'\\', '</span>{<span style="color:#006080;">', '</span>}<span style="color:#006080;">', '</span>|<span style="color:#006080;">', '</span>&lt;<span style="color:#006080;">', '</span>&gt;<span style="color:#006080;">', '</span>?<span style="color:#006080;">', '</span>,<span style="color:#006080;">', '</span>.<span style="color:#006080;">', '</span>/<span style="color:#006080;">', '</span>:<span style="color:#006080;">', '</span>;<span style="color:#006080;">', '</span>\<span style="color:#006080;">''</span>, <span style="color:#006080;">'"'</span>, <span style="color:#006080;">'+'</span>, <span style="color:#006080;">'~'</span>, <span style="color:#006080;">'*'</span>, <span style="color:#006080;">'.'</span>});</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum530"> 530:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum531"> 531:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum532"> 532:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum533"> 533:</span> <span style="color:#008000;">     * Strips all characters that are not numbers (0 - 9) and returns a new</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum534"> 534:</span> <span style="color:#008000;">     * string. Returns and empty string if the mobile number is null or empty.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum535"> 535:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum536"> 536:</span> <span style="color:#008000;">     * @param mobileNumber - mobile number string to parse</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum537"> 537:</span> <span style="color:#008000;">     * @return String - parsed mobile number</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum538"> 538:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum539"> 539:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String safeCleanMobileNumber(String mobileNumber) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum540"> 540:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum541"> 541:</span>         <span style="color:#008000;">//logger.debug("getting clean for " + mobileNumber);</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum542"> 542:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum543"> 543:</span>         <span style="color:#0000ff;">if</span> (isNullOrEmpty(mobileNumber)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum544"> 544:</span>             <span style="color:#008000;">//logger.debug("was nullOrEmpty ");</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum545"> 545:</span>             <span style="color:#0000ff;">return</span> null;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum546"> 546:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum547"> 547:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum548"> 548:</span>         StringBuilder cleanMobileNumber = <span style="color:#0000ff;">new</span> StringBuilder();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum549"> 549:</span>         <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt; mobileNumber.length(); i++) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum550"> 550:</span>             <span style="color:#0000ff;">if</span> (VALID_NUMBERS.contains(mobileNumber.charAt(i))) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum551"> 551:</span>                 cleanMobileNumber.append(mobileNumber.charAt(i));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum552"> 552:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum553"> 553:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum554"> 554:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum555"> 555:</span>         <span style="color:#008000;">// remove the first (1) at the beginning of the to match default us</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum556"> 556:</span>         <span style="color:#008000;">// numbers</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum557"> 557:</span>         <span style="color:#008000;">// 10 digits</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum558"> 558:</span>         <span style="color:#0000ff;">if</span> (cleanMobileNumber.length() &gt; 10 &amp;&amp; startsWith(cleanMobileNumber.toString(), <span style="color:#006080;">"1"</span>)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum559"> 559:</span>             <span style="color:#008000;">//logger.debug("clean 1 " + cleanMobileNumber.substring(1));</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum560"> 560:</span>             <span style="color:#0000ff;">return</span> cleanMobileNumber.substring(1);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum561"> 561:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum562"> 562:</span>         <span style="color:#0000ff;">if</span> (cleanMobileNumber.length() &gt; 10 &amp;&amp; startsWith(cleanMobileNumber.toString(), <span style="color:#006080;">"+1"</span>)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum563"> 563:</span>             <span style="color:#008000;">//logger.debug("clean 2 " + cleanMobileNumber.substring(1));</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum564"> 564:</span>             <span style="color:#0000ff;">return</span> cleanMobileNumber.substring(2);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum565"> 565:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum566"> 566:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum567"> 567:</span>         <span style="color:#008000;">//logger.debug("clean " + cleanMobileNumber.toString());</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum568"> 568:</span>         <span style="color:#0000ff;">return</span> cleanMobileNumber.toString();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum569"> 569:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum570"> 570:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum571"> 571:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum572"> 572:</span> <span style="color:#008000;">     * Same as safeCleanMobileNumber except for devices</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum573"> 573:</span> <span style="color:#008000;">     * in which case the device number is removed first</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum574"> 574:</span> <span style="color:#008000;">     *</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum575"> 575:</span> <span style="color:#008000;">     * @param mobileNumber - mobile number string to parse</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum576"> 576:</span> <span style="color:#008000;">     * @return String - parsed mobile number</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum577"> 577:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum578"> 578:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String safeCleanMobileNumberRemoveDevice(String mobileNumber) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum579"> 579:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum580"> 580:</span>         <span style="color:#0000ff;">if</span> (startsWith(mobileNumber, <span style="color:#006080;">"device:/"</span>)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum581"> 581:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum582"> 582:</span>             <span style="color:#0000ff;">int</span> index = mobileNumber.lastIndexOf(<span style="color:#006080;">'/'</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum583"> 583:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum584"> 584:</span>             <span style="color:#008000;">// If the last index of '/' is &gt; than the first</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum585"> 585:</span>             <span style="color:#0000ff;">if</span> (index &gt; 7) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum586"> 586:</span>                 mobileNumber = mobileNumber.substring(0, index);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum587"> 587:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum588"> 588:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum589"> 589:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum590"> 590:</span>         <span style="color:#0000ff;">return</span> safeCleanMobileNumber(mobileNumber);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum591"> 591:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum592"> 592:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum593"> 593:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isValidEmail(String email){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum594"> 594:</span>         <span style="color:#008000;">// see http://www.mkyong.com/regular-expressions/how-to-validate-email-address-with-regular-expression/</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum595"> 595:</span>         Pattern pattern ;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum596"> 596:</span>         java.util.regex.Matcher matcher;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum597"> 597:</span>         <span style="color:#0000ff;">final</span> String EMAIL_PATTERN = <span style="color:#006080;">"^[\\w\\-]+(\\.[\\w\\-]+)*@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}$"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum598"> 598:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum599"> 599:</span>         pattern = Pattern.compile(EMAIL_PATTERN);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum600"> 600:</span>         matcher = pattern.matcher(email);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum601"> 601:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum602"> 602:</span>         <span style="color:#0000ff;">return</span> matcher.matches();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum603"> 603:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum604"> 604:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum605"> 605:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum606"> 606:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum607"> 607:</span> <span style="color:#008000;">     * The length is valid if it is between 3 and 6 or over</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum608"> 608:</span> <span style="color:#008000;">     * 10 and up to and including 20</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum609"> 609:</span> <span style="color:#008000;">     * 3-6 length means short codes</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum610"> 610:</span> <span style="color:#008000;">     * 10 length 000-000-0000</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum611"> 611:</span> <span style="color:#008000;">     * 10+ means international</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum612"> 612:</span> <span style="color:#008000;">     *</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum613"> 613:</span> <span style="color:#008000;">     * @param mobileNumber</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum614"> 614:</span> <span style="color:#008000;">     * @return</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum615"> 615:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum616"> 616:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isValidLengthMobileNumber(String mobileNumber) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum617"> 617:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum618"> 618:</span>         <span style="color:#0000ff;">if</span> (isNullOrEmpty(mobileNumber))  {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum619"> 619:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum620"> 620:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum621"> 621:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum622"> 622:</span>         <span style="color:#0000ff;">int</span> numberLength = mobileNumber.length();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum623"> 623:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum624"> 624:</span>         <span style="color:#008000;">// Wrong if under 3 and between 7 and 9 digits long or longer than 20</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum625"> 625:</span>         <span style="color:#0000ff;">if</span> (numberLength &lt; 3 || numberLength == 7 || numberLength == 8 || numberLength == 9 || numberLength &gt; MAX_MOBILE_NUMBER_DIGITS) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum626"> 626:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum627"> 627:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum628"> 628:</span>         <span style="color:#008000;">// Correct is 3 to 6 for short codes and 10 to 20 for long international</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum629"> 629:</span>         <span style="color:#008000;">// numbers, including a buffer</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum630"> 630:</span>         <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum631"> 631:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum632"> 632:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum633"> 633:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> startsWith(String string1, String toFind) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum634"> 634:</span>         <span style="color:#0000ff;">if</span> (string1 == null &amp;&amp; toFind == null){</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum635"> 635:</span>             <span style="color:#008000;">// null contains null.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum636"> 636:</span>             <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum637"> 637:</span>         } <span style="color:#0000ff;">else</span> <span style="color:#0000ff;">if</span> (string1 == null){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum638"> 638:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum639"> 639:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum640"> 640:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum641"> 641:</span>         <span style="color:#0000ff;">if</span> (StringUtil.equalsIgnoreCase(string1, toFind)){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum642"> 642:</span>             <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum643"> 643:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum644"> 644:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum645"> 645:</span>         <span style="color:#0000ff;">return</span> string1.toLowerCase().startsWith(toFind.toLowerCase());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum646"> 646:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum647"> 647:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum648"> 648:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> endsWith(String source, String toFind) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum649"> 649:</span>         <span style="color:#0000ff;">if</span> (source == null) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum650"> 650:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum651"> 651:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum652"> 652:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum653"> 653:</span>         <span style="color:#0000ff;">return</span> source.endsWith(toFind);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum654"> 654:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum655"> 655:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum656"> 656:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String defaultValue(String string, String defaultValue) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum657"> 657:</span>         <span style="color:#0000ff;">if</span> (StringUtil.isNullOrEmpty(string)){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum658"> 658:</span>             <span style="color:#0000ff;">return</span> defaultValue;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum659"> 659:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum660"> 660:</span>         <span style="color:#0000ff;">return</span> string;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum661"> 661:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum662"> 662:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum663"> 663:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> <span style="color:#0000ff;">class</span> Schema {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum664"> 664:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum665"> 665:</span>         <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">final</span> String TEL = <span style="color:#006080;">"tel"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum666"> 666:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum667"> 667:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum668"> 668:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum669"> 669:</span> <span style="color:#008000;">     * Takes a string representing the display name and returns and array with</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum670"> 670:</span> <span style="color:#008000;">     * first name and last name.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum671"> 671:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum672"> 672:</span> <span style="color:#008000;">     * Returns null if null or empty input</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum673"> 673:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum674"> 674:</span> <span style="color:#008000;">     * @param displayName</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum675"> 675:</span> <span style="color:#008000;">     * @return String[]</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum676"> 676:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum677"> 677:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String[] splitDisplayName(String displayName) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum678"> 678:</span>         <span style="color:#0000ff;">if</span> (displayName == null || displayName.length() &lt; 1) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum679"> 679:</span>             <span style="color:#0000ff;">return</span> null;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum680"> 680:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum681"> 681:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum682"> 682:</span>         String[] names = displayName.split(<span style="color:#006080;">" "</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum683"> 683:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum684"> 684:</span>         <span style="color:#0000ff;">return</span> names;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum685"> 685:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum686"> 686:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum687"> 687:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum688"> 688:</span> <span style="color:#008000;">     * Takes a string representing a list of mobile numbers as</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum689"> 689:</span> <span style="color:#008000;">     * 5555551212, 5556667878 or</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum690"> 690:</span> <span style="color:#008000;">     * 5555551212; 5556667878</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum691"> 691:</span> <span style="color:#008000;">     *</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum692"> 692:</span> <span style="color:#008000;">     * Returns null if null or empty input</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum693"> 693:</span> <span style="color:#008000;">     *</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum694"> 694:</span> <span style="color:#008000;">     * @param sourceNumber</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum695"> 695:</span> <span style="color:#008000;">     * @return List&lt;String&gt;</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum696"> 696:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum697"> 697:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> List&lt;String&gt; splitMobileNumbers(String sourceNumber) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum698"> 698:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum699"> 699:</span>         ArrayList&lt;String&gt; result = <span style="color:#0000ff;">new</span> ArrayList&lt;String&gt;();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum700"> 700:</span>         <span style="color:#0000ff;">int</span> last = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum701"> 701:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum702"> 702:</span>         <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt; sourceNumber.length(); i++) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum703"> 703:</span>             <span style="color:#0000ff;">if</span> (sourceNumber.charAt(i) == <span style="color:#006080;">';'</span> || sourceNumber.charAt(i) == <span style="color:#006080;">','</span>) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum704"> 704:</span>                 String number = sourceNumber.substring(last, i).trim();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum705"> 705:</span>                 result.add(number);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum706"> 706:</span>                 last = i + 1;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum707"> 707:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum708"> 708:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum709"> 709:</span>         result.add(sourceNumber.substring(last).trim());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum710"> 710:</span>         <span style="color:#0000ff;">return</span> result;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum711"> 711:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum712"> 712:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum713"> 713:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum714"> 714:</span> <span style="color:#008000;">     * Format the mobile number</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum715"> 715:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum716"> 716:</span> <span style="color:#008000;">     * @param mobileNumber</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum717"> 717:</span> <span style="color:#008000;">     * @param format</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum718"> 718:</span> <span style="color:#008000;">     *            - ###-###-####</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum719"> 719:</span> <span style="color:#008000;">     * @return</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum720"> 720:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum721"> 721:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String format(String mobileNumber, String format) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum722"> 722:</span>         <span style="color:#0000ff;">if</span> (mobileNumber == null || mobileNumber.length() &lt; 1 || format == null || format.length() &lt; 1) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum723"> 723:</span>             <span style="color:#0000ff;">return</span> mobileNumber;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum724"> 724:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum725"> 725:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum726"> 726:</span>         <span style="color:#0000ff;">int</span> numberCount = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum727"> 727:</span>         <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt; format.length(); i++) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum728"> 728:</span>             <span style="color:#0000ff;">if</span> (format.charAt(i) == <span style="color:#006080;">'#'</span>) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum729"> 729:</span>                 numberCount++;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum730"> 730:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum731"> 731:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum732"> 732:</span>         String number = safeCleanMobileNumber(mobileNumber);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum733"> 733:</span>         <span style="color:#0000ff;">if</span> (numberCount != number.length()) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum734"> 734:</span>             <span style="color:#0000ff;">return</span> mobileNumber;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum735"> 735:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum736"> 736:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum737"> 737:</span>         List&lt;Character&gt; numberChars = <span style="color:#0000ff;">new</span> ArrayList&lt;Character&gt;();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum738"> 738:</span>         <span style="color:#0000ff;">char</span>[] chars = <span style="color:#0000ff;">new</span> <span style="color:#0000ff;">char</span>[format.length()];</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum739"> 739:</span>         <span style="color:#0000ff;">int</span> count = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum740"> 740:</span>         <span style="color:#0000ff;">for</span> (<span style="color:#0000ff;">int</span> i = 0; i &lt; format.length(); i++) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum741"> 741:</span>             <span style="color:#0000ff;">if</span> (format.charAt(i) == <span style="color:#006080;">'#'</span>) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum742"> 742:</span>                 numberChars.add(number.charAt(count));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum743"> 743:</span>                 chars[i] = number.charAt(count);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum744"> 744:</span>                 count++;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum745"> 745:</span>             } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum746"> 746:</span>                 numberChars.add(format.charAt(i));</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum747"> 747:</span>                 chars[i] = format.charAt(i);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum748"> 748:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum749"> 749:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum750"> 750:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum751"> 751:</span>         <span style="color:#0000ff;">return</span> <span style="color:#0000ff;">new</span> String(chars);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum752"> 752:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum753"> 753:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum754"> 754:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String stringArrayToDelimittedString(String[] arrayString, String delimiter) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum755"> 755:</span>         <span style="color:#0000ff;">return</span> stringArrayToDelimittedString(arrayString, delimiter, null);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum756"> 756:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum757"> 757:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum758"> 758:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String stringArrayToDelimittedString(String[] arrayString, String delimiter, String format) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum759"> 759:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum760"> 760:</span>         <span style="color:#0000ff;">if</span> (arrayString == null || delimiter == null) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum761"> 761:</span>             <span style="color:#0000ff;">return</span> null;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum762"> 762:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum763"> 763:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum764"> 764:</span>         StringBuilder delimittedString = <span style="color:#0000ff;">new</span> StringBuilder();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum765"> 765:</span>         <span style="color:#0000ff;">if</span> (format == null || format.length() &lt; 1) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum766"> 766:</span>             <span style="color:#0000ff;">for</span> (String number : arrayString) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum767"> 767:</span>                 delimittedString.append(number).append(delimiter);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum768"> 768:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum769"> 769:</span>         } <span style="color:#0000ff;">else</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum770"> 770:</span>             <span style="color:#0000ff;">for</span> (String number : arrayString) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum771"> 771:</span>                 number = StringUtil.format(number, format);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum772"> 772:</span>                 delimittedString.append(number).append(delimiter);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum773"> 773:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum774"> 774:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum775"> 775:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum776"> 776:</span>         <span style="color:#0000ff;">return</span> delimittedString.toString();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum777"> 777:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum778"> 778:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum779"> 779:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum780"> 780:</span> <span style="color:#008000;">     * Takes a delimited values string and returns is as a set</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum781"> 781:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum782"> 782:</span> <span style="color:#008000;">     * @param string</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum783"> 783:</span> <span style="color:#008000;">     * @param delimiter</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum784"> 784:</span> <span style="color:#008000;">     * @return Set&lt;String&gt;</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum785"> 785:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum786"> 786:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> Set&lt;String&gt; stringToSet(String string, String delimiter) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum787"> 787:</span>         <span style="color:#0000ff;">if</span> (isNullOrEmpty(string) || isNullOrEmpty(delimiter)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum788"> 788:</span>             <span style="color:#0000ff;">return</span> null;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum789"> 789:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum790"> 790:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum791"> 791:</span>         String[] toArray = string.split(delimiter);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum792"> 792:</span>         Set&lt;String&gt; toSet = null;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum793"> 793:</span>         <span style="color:#0000ff;">if</span> (toArray != null &amp;&amp; toArray.length &gt; 0) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum794"> 794:</span>             toSet = <span style="color:#0000ff;">new</span> HashSet&lt;String&gt;();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum795"> 795:</span>             <span style="color:#0000ff;">for</span> (String value : toArray) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum796"> 796:</span>                 <span style="color:#0000ff;">if</span> (!isNullOrEmpty(value)) toSet.add(value);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum797"> 797:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum798"> 798:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum799"> 799:</span>         <span style="color:#0000ff;">return</span> toSet;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum800"> 800:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum801"> 801:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum802"> 802:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum803"> 803:</span> <span style="color:#008000;">     * Return true if the string is null. Trims the string and checks if it is</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum804"> 804:</span> <span style="color:#008000;">     * an empty string</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum805"> 805:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum806"> 806:</span> <span style="color:#008000;">     * @param string</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum807"> 807:</span> <span style="color:#008000;">     * @return</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum808"> 808:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum809"> 809:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isNullOrEmpty(String string) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum810"> 810:</span>         <span style="color:#0000ff;">return</span> (string == null || string.trim().length() &lt; 1);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum811"> 811:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum812"> 812:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum813"> 813:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isNullOrEmpty(String... strings) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum814"> 814:</span>         <span style="color:#0000ff;">for</span> (String string : strings) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum815"> 815:</span>             <span style="color:#0000ff;">if</span> (isNullOrEmpty(string)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum816"> 816:</span>                 <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum817"> 817:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum818"> 818:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum819"> 819:</span>         <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum820"> 820:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum821"> 821:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum822"> 822:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> exists(String string) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum823"> 823:</span>         <span style="color:#0000ff;">return</span> !isNullOrEmpty(string);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum824"> 824:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum825"> 825:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum826"> 826:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> equals(String string1, String string2){</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum827"> 827:</span>         <span style="color:#0000ff;">if</span> (string1 == string2)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum828"> 828:</span>             <span style="color:#0000ff;">return</span> true; <span style="color:#008000;">// covers both null, or both same instance</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum829"> 829:</span>         <span style="color:#0000ff;">if</span> (string1 == null){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum830"> 830:</span>             <span style="color:#0000ff;">return</span> false; <span style="color:#008000;">// covers 1 null, other not.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum831"> 831:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum832"> 832:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum833"> 833:</span>         <span style="color:#0000ff;">return</span> (string1.equals(string2)); <span style="color:#008000;">// covers equals</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum834"> 834:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum835"> 835:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum836"> 836:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> equalsIgnoreCase(String string, String type) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum837"> 837:</span>         <span style="color:#0000ff;">boolean</span> oneEmpty = isNullOrEmpty(string);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum838"> 838:</span>         <span style="color:#0000ff;">boolean</span> otherEmpty = isNullOrEmpty(type);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum839"> 839:</span>         <span style="color:#0000ff;">if</span> (oneEmpty &amp;&amp; otherEmpty) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum840"> 840:</span>             <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum841"> 841:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum842"> 842:</span>         <span style="color:#0000ff;">if</span> (oneEmpty || otherEmpty) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum843"> 843:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum844"> 844:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum845"> 845:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum846"> 846:</span>         <span style="color:#0000ff;">return</span> string.equalsIgnoreCase(type);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum847"> 847:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum848"> 848:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum849"> 849:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isIntegerParsable(String toCheck){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum850"> 850:</span>         <span style="color:#0000ff;">if</span> (toCheck == null) <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum851"> 851:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum852"> 852:</span>             Integer.parseInt(toCheck);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum853"> 853:</span>             <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum854"> 854:</span>         } <span style="color:#0000ff;">catch</span> (NumberFormatException e){</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum855"> 855:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum856"> 856:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum857"> 857:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum858"> 858:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum859"> 859:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">boolean</span> isLongParsable(String toCheck){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum860"> 860:</span>         <span style="color:#0000ff;">if</span> (toCheck == null) <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum861"> 861:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum862"> 862:</span>             Long.parseLong(toCheck);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum863"> 863:</span>             <span style="color:#0000ff;">return</span> true;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum864"> 864:</span>         } <span style="color:#0000ff;">catch</span> (NumberFormatException e){</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum865"> 865:</span>             <span style="color:#0000ff;">return</span> false;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum866"> 866:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum867"> 867:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum868"> 868:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum869"> 869:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String[] convert(Object... parameters){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum870"> 870:</span>         String[] args = <span style="color:#0000ff;">new</span> String[parameters.length];</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum871"> 871:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum872"> 872:</span>         <span style="color:#0000ff;">int</span> idx = 0;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum873"> 873:</span>         <span style="color:#0000ff;">for</span>(Object object : parameters){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum874"> 874:</span>             args[idx] = String.valueOf(object);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum875"> 875:</span>             idx ++;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum876"> 876:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum877"> 877:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum878"> 878:</span>         <span style="color:#0000ff;">return</span> args;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum879"> 879:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum880"> 880:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum881"> 881:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String join(Object... parts) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum882"> 882:</span>         StringBuilder sb = <span style="color:#0000ff;">new</span> StringBuilder();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum883"> 883:</span>         <span style="color:#0000ff;">for</span>(Object part : parts){</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum884"> 884:</span>             <span style="color:#0000ff;">if</span> (part == null){</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum885"> 885:</span>                 <span style="color:#0000ff;">continue</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum886"> 886:</span>             }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum887"> 887:</span>             sb.append(String.valueOf(part));</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum888"> 888:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum889"> 889:</span>         <span style="color:#0000ff;">return</span> sb.toString();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum890"> 890:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum891"> 891:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum892"> 892:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum893"> 893:</span> <span style="color:#008000;">     * Check if the last character in the string matches the input character and</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum894"> 894:</span> <span style="color:#008000;">     * removes. If the match fails, we return the string as it is.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum895"> 895:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum896"> 896:</span> <span style="color:#008000;">     * @param inputString</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum897"> 897:</span> <span style="color:#008000;">     * @param c</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum898"> 898:</span> <span style="color:#008000;">     * @return string</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum899"> 899:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum900"> 900:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String removeLast(String inputString, <span style="color:#0000ff;">char</span> c) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum901"> 901:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum902"> 902:</span>         <span style="color:#0000ff;">if</span> (isNullOrEmpty(inputString)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum903"> 903:</span>             <span style="color:#0000ff;">return</span> inputString;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum904"> 904:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum905"> 905:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum906"> 906:</span>         <span style="color:#0000ff;">if</span> (inputString.charAt(inputString.length() - 1) == c) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum907"> 907:</span>             <span style="color:#0000ff;">return</span> inputString.substring(0, inputString.length() - 1);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum908"> 908:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum909"> 909:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum910"> 910:</span>         <span style="color:#0000ff;">return</span> inputString;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum911"> 911:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum912"> 912:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum913"> 913:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String stripStringNull(String param) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum914"> 914:</span>         <span style="color:#0000ff;">return</span> (StringUtil.isNullOrEmpty(param) || <span style="color:#006080;">"null"</span>.equalsIgnoreCase(param)) ? StringUtil.EMPTY_STRING : param;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum915"> 915:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum916"> 916:</span>     </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum917"> 917:</span>     <span style="color:#008000;">/**</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum918"> 918:</span> <span style="color:#008000;">     * </span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum919"> 919:</span> <span style="color:#008000;">     * @param contents</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum920"> 920:</span> <span style="color:#008000;">     * @param key</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum921"> 921:</span> <span style="color:#008000;">     * @param value</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum922"> 922:</span> <span style="color:#008000;">     * @return</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum923"> 923:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum924"> 924:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String convertPatterns(String contents, Map&lt;String, String&gt; keyVals) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum925"> 925:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum926"> 926:</span>         <span style="color:#0000ff;">if</span> (contents == null) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum927"> 927:</span>             <span style="color:#0000ff;">throw</span> <span style="color:#0000ff;">new</span> NullPointerException(<span style="color:#006080;">"Cannot convert null pattern"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum928"> 928:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum929"> 929:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum930"> 930:</span>         <span style="color:#0000ff;">for</span>(Map.Entry&lt;String, String&gt; entry : keyVals.entrySet()) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum931"> 931:</span>             contents = contents.replaceAll(entry.getKey(), entry.getValue());</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum932"> 932:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum933"> 933:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum934"> 934:</span>         <span style="color:#0000ff;">return</span> contents;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum935"> 935:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum936"> 936:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum937"> 937:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> String convertPatterns(</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum938"> 938:</span>         <span style="color:#0000ff;">final</span> String contents,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum939"> 939:</span>         <span style="color:#0000ff;">final</span> String hostnamePattern,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum940"> 940:</span>         <span style="color:#0000ff;">final</span> String string</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum941"> 941:</span>     ) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum942"> 942:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum943"> 943:</span>         <span style="color:#0000ff;">final</span> Map&lt;String, String&gt; keyVals = <span style="color:#0000ff;">new</span> HashMap&lt;String, String&gt;();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum944"> 944:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum945"> 945:</span>         <span style="color:#0000ff;">return</span> convertPatterns(contents, keyVals);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum946"> 946:</span>         </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum947"> 947:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum948"> 948:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum949"> 949:</span> }</pre>
</div>
</div>
<p>Your Eclipse window package explorer should have two files in it now: Bubble.java and Main.java.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_15.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_15.png" width="244" height="233"></a></p>
<p>Now, you can go ahead and run your code but you will get errors because you don’t have the pictures required by the Bubble.java class to render out the nice looking bubble. So, you need to go create a resources folder and place the pictures inside it.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_16.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_16.png" width="244" height="131"></a></p>
<p>Then paste in the 3 pictures into the folder. These pictures are also in the main zip file for the entire project at the start of this posting. Or you can download them here.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/resources.zip">resources.zip</a> 23 KB</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_17.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_17.png" width="209" height="244"></a></p>
<p>Ok, now go to your Main.java file and run the program. The best way to do this is to move your cursor into the static void main() method and right-click. Choose Run As –&gt; Java Application. This will execute the static void main() and actually run your app. You will see a lot of output in the console window. This is the Zipwhip API giving you lots of debugging feedback.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_18.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_18.png" width="244" height="200"></a></p>
<p>Now, here’s the big moment. Go ahead and send yourself a text message to the phone you are logged in as. You will get a slick popup window fading in on your desktop in the upper right corner. You can double-click the bubble to jump to the configured URL to reply to your message. You can also hit the reply button or close the bubble.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_19.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_19.png" width="221" height="213"></a></p>
<p>The key extra chunk of code for this example vs. the <a href="https://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/">previous posting</a> is that we are now listening to signals and parsing them so we can perform a switch. I created an ENUM of some of the standard signals from the Zipwhip API so that I could perform a switch since Java still does not let you do a switch on strings.</p>
<p>Here is the signal observer code and the switch statement.</p>
<div id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> signalClient.addSignalObserver(<span style="color:#0000ff;">new</span> SignalObserver() {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>     @Override</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> notifySignalReceived(Signal signal) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span>         log.debug(<span style="color:#006080;">"Signal received with uri "</span> + signal.uri);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span>         <span style="color:#0000ff;">switch</span> (SignalUri.toSignalUri(signal.uri)) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span>         <span style="color:#0000ff;">case</span> SIGNAL_MESSAGE_RECEIVE:</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>             <span style="color:#008000;">// We got a message. Let's show it.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span>             <span style="color:#008000;">// The Message object is contained in the signal.content object</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>             <span style="color:#008000;">// but you need to cast it.</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>             Message msg = (Message)signal.content;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>             showIncomingMessageAlert(msg);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>             <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>         <span style="color:#0000ff;">case</span> SIGNAL_CONVERSATION_CHANGE:</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>             <span style="color:#008000;">// Do nothing for now</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>             <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>         <span style="color:#0000ff;">default</span>:</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>             <span style="color:#008000;">// Do nothing if we don't know the signal</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>             <span style="color:#0000ff;">break</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>  });</pre>
</div>
</div>
<p>&nbsp;</p>
<p>You will need to also have the class for the Enum. I got lazy and just placed it into the Main.java file. Technically you should likely place this in its own class file.</p>
<div id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">enum</span> SignalUri</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>     <span style="color:#008000;">/*</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#008000;">     * /signal/message/progress</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#008000;">     * /signal/messageProgress/messageProgress</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#008000;">     * /signal/message/send</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#008000;">     * /signal/message/receive</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span> <span style="color:#008000;">     * /signal/message/read</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#008000;">     * /signal/message/delete</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span> <span style="color:#008000;">     * /signal/conversation/change</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span> <span style="color:#008000;">     */</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>     SIGNAL_MESSAGE_RECEIVE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>     SIGNAL_MESSAGE_PROGRESS,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>     SIGNAL_MESSAGE_READ,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>     SIGNAL_MESSAGE_DELETE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>     SIGNAL_MESSAGEPROGRESS_MESSAGEPROGRESS,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>     SIGNAL_CONVERSATION_CHANGE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>     SIGNAL_CONTACT_NEW,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>     SIGNAL_CONTACT_SAVE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>     SIGNAL_CONTACT_DELETE,</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>     NOVALUE;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> SignalUri toSignalUri(String str)</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span>     {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span>         <span style="color:#008000;">// We are going to use Java's valueOf method, so</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>         <span style="color:#008000;">// we need to cleanup the URI string first</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span>         <span style="color:#008000;">// Get rid of first slash</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span>         String str2 = str.substring(1, str.length());</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span>         <span style="color:#008000;">// convert slashes to underscores</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span>         str2 = str2.replaceAll(<span style="color:#006080;">"/"</span>, <span style="color:#006080;">"_"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span>         <span style="color:#008000;">// go all upper case</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum32">  32:</span>         str2 = str2.toUpperCase();</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum33">  33:</span>&nbsp; </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum34">  34:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum35">  35:</span>             <span style="color:#0000ff;">return</span> valueOf(str2);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum36">  36:</span>         } </pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum37">  37:</span>         <span style="color:#0000ff;">catch</span> (Exception ex) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum38">  38:</span>             System.out.println(<span style="color:#006080;">"Found no match for SignalURI:"</span> + str);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum39">  39:</span>             <span style="color:#0000ff;">return</span> NOVALUE;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum40">  40:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum41">  41:</span>     }   </pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum42">  42:</span> }</pre>
</div>
</div>
<p>&nbsp;</p>
<p>This posting is about the Zipwhip API so I don’t want to get into the details of the cool looking bubble being generated from the Bubble() class, but it’s worth noting that we are using some of the features only available in later versions of Java that let you create transparent windows. We are doing some fade in/out tricks. We are manually adding mouse listeners to let you drag the window around. We are doing some sprite tricks with getSubImage() so we can repurpose some web PNGs as well. It was quite a lot of work to get that Bubble class setup, but it was well worth it because you can run this app non-stop and actually start using it to get real-time popups.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_20.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_20.png" width="623" height="231"></a></p>
<p>If you want to try some tricks with the Bubble to see if there are things you like better than the settings I picked, one of the things I recommend is to allow the window focus to be set. If you do this, you will be able to select the text from the message to copy it to the clipboard. Go into the code and change the this.setFocusableWindowState() line:</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_21.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_21.png" width="624" height="61"></a></p>
<p>Notice that you can now select text, hit Ctrl-C to copy it to the clipboard, hit tab to choose Reply, hit the spacebar to choose the button, etc. The reason I didn’t pick allowing focus is that if a bubble pops in while you’re doing something like writing an email, I don’t think it’s a good idea to steal the focus. The user could consider that rude. However, it’s up to you how you want to setup your app.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_22.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_22.png" width="205" height="212"></a>&nbsp;<a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_23.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_23.png" width="109" height="98"></a><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_24.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_24.png" width="112" height="75"></a></p>
<p>Ok, thanks for reading the tutorial. Enjoy playing with your popup bubbles on your desktop when your friends text you on your phone.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=75&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2011/07/17/tutorial-using-the-zipwhip-api-in-java-to-popup-your-text-messages-in-a-bubble-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_25.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_25.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_14.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_15.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_16.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_17.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_18.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_19.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_20.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_21.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_22.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_23.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API_93FC/image_thumb_24.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: Using the Zipwhip API in Java to Receive Text Messages via Sockets</title>
		<link>http://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/</link>
		<comments>http://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 20:02:39 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">https://zipwhip.wordpress.com/?p=65</guid>
		<description><![CDATA[I wrote a post about two weeks ago about using the Zipwhip API in Java to send a text message. This post will complete the picture by showing you how to receive a text message via the Zipwhip API. This is a little bit more involved than the previous post. Sending a message simply requires [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=65&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote a post about two weeks ago about <a href="https://zipwhip.wordpress.com/2011/06/19/tutorial-using-the-zipwhip-api-in-java/">using the Zipwhip API in Java to send a text message</a>. This post will complete the picture by showing you how to receive a text message via the Zipwhip API. This is a little bit more involved than the previous post. Sending a message simply requires your code to zip off a message via the API which uses HTTP. Receiving, however, requires your code to bind to Zipwhip’s socket server and stay bound in to wait for the moment a text message actually arrives. This means your app must always be running to receive the text message.</p>
<p>As a background, there are a few ways to receive text messages from the Zipwhip network:</p>
<ol>
<li><strong>Short polling<br /></strong>You can query Zipwhip’s session/update API once every 10 seconds, or however often, and you will be told what signals you missed such as new messages, messages being marked as read, new contacts, etc. This means you are not getting messages in real-time, however this is a super simplistic method of getting updates or events. This is especially useful in Javascript apps that can’t create sockets.
<li><strong>IP Socket-based push</strong><br />You can bind into a socket and get real-time signals from the Zipwhip network. This means that when a text message hits your phone, it will be immediately (within milliseconds) hitting your app. This requires a bit more complexity in your app, but it’s very worthwhile for the best experience.
<li><strong>Post to a URL</strong><br />This method allows you to tell the Zipwhip network to post a copy of all of your signals to a URL. This is a very cool feature that Zipwhip gives you, but you must be running your own server at a public address for Zipwhip to be able to reach it. If you have to move your server around, you have to unregister the URL and reregister the URL you want posted to. This solution would not likely be used by consumer apps due to the configuration overhead. </li>
</ol>
<p>This tutorial will just describe how to do<strong> IP Socket-based push</strong> because, in my opinion, it’s one of the coolest aspects of the Zipwhip network and the most powerful for the consumer or general developer. It lets you connect from any location at any time, or as many locations as you want, and get all of your signals delivered. So, if I want to run an app on my laptop, my desktop, my tablet, my Ubuntu box, and my Google TV, to get my text messages I can simply bind in via a socket and get copies of texts popping up everywhere I could ever want them. Because the Zipwhip network propagates things such as text messages being marked as read, especially back to my phone, I don’t have to mark a text as read on all of my computers like the way Skype makes me mark messages as read everywhere or the way Outlook makes me expire my envelope in the system tray on all of my machines.</p>
<p>Let’s get started. We need to fire up Eclipse where we’ll make a new Java project from scratch.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image_thumb" border="0" alt="image_thumb" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_thumb.png" width="244" height="160"></a></p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image_thumb1" border="0" alt="image_thumb1" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb1_thumb.png" width="244" height="56"></a></p>
<p>Call the project ZipwhipAPISocketExample. (BTW, you can zoom in on the screenshots by clicking them.)</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_3.png" width="172" height="244"></a></p>
<p>Go to the Libraries tab and make sure you have the ZipwhipAPI Jar added as well as the Log4j Jar. You can get these in your list by clicking on “Add External JARs…”. You will need to download the ZipwhipAPI from here if you don’t already have it. If you don’t have Log4j you can search for it or head over to the <a href="http://logging.apache.org/log4j/1.2/download.html">Apache Log4j project here</a>. You will also need slf4j which is a small utility that abstracts Log4j to be used in different environments. These log dependencies are just a result of the ZipwhipAPI relying on them. They’re nice to use in your own projects too if you want to.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/ZipwhipAPI.jar">Zipwhip API Jar (820KB)</a></p>
<p>If you want to also download the dependencies you can grab the files below. Because these are popular files, you may already have these.</p>
<p><a href="http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.15/apache-log4j-1.2.15.zip">Log4j Jar (ZipwhipAPI.jar depends on this Jar)</a></p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/slf4j-android.jar">Slf4j Jar (ZipwhipAPI.jar depends on this Jar)</a></p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_12.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_13.png" width="224" height="244"></a></p>
<p>Hit Finish on the dialog above. You should now have a new project called “ZipwhipAPISocketExample” and a clean Eclipse window with an empty project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_5.png" width="244" height="184"></a></p>
<p>Create a new Java class so that we have a file to create our entry point in.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_6.png" width="244" height="122"></a></p>
<p>Create a package name like com.yourcompany.zwsocket. Of course swap in your name or your company’s name in place of what I typed. Then call the Java class ExampleMain or whatever name you prefer. Make sure to check off to create the “void main()” method so we have an entry point to our example.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_7.png" width="209" height="244"></a></p>
<p>Click Finish. You should see a new Java class in your editor.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_8.png" width="244" height="184"></a></p>
<p>Now, replace all of the text with the source code below. You can download it here, or you can cut &amp; paste it.</p>
<p>
<div style="display:inline;float:none;margin:0;padding:0;" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:89a5428c-d469-4de5-a4f0-c37f50b453f3" class="wlWriterEditableSmartContent">
<p> <a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/ExampleMain_3.java" target="_blank">ExampleMain.java</a></p>
</div>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;height:194px;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> <span style="color:#0000ff;">package</span> com.yourcompany.zwsocket;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.DefaultZipwhipSubscriptionClient;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.HttpConnection;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5">   5:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.signals.JsonSocketSignalClient;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6">   6:</span> <span style="color:#0000ff;">import</span> com.zipwhip.signals.Signal;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7">   7:</span> <span style="color:#0000ff;">import</span> com.zipwhip.signals.SignalObserver;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8">   8:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9">   9:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> ExampleMain {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10">  10:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11">  11:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> main(String[] args) {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12">  12:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13">  13:</span>         <span style="color:#008000;">// Create our connection object for the Zipwhip API.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14">  14:</span>         <span style="color:#008000;">// This object gets an authenticated HTTP connection to the </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15">  15:</span>         <span style="color:#008000;">// Zipwhip network via a login which gets you a sessionKey.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16">  16:</span>         HttpConnection connection = <span style="color:#0000ff;">new</span> HttpConnection();</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17">  17:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum18">  18:</span>         String mobileNumber = <span style="color:#006080;">"3135551234"</span>;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum19">  19:</span>         String password = <span style="color:#006080;">"mypassword"</span>;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum20">  20:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum21">  21:</span>         System.out.println(String.format(</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum22">  22:</span>             <span style="color:#006080;">"Logging into Zipwhip network with mobile:%s, pass:%s"</span>, </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum23">  23:</span>             mobileNumber, password));</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum24">  24:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum25">  25:</span>         <span style="color:#0000ff;">try</span> {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum26">  26:</span>             <span style="color:#008000;">// This method will send a login request to the Zipwhip network and</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum27">  27:</span>             <span style="color:#008000;">// if successful you will get a sesionKey set in your connection object</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum28">  28:</span>             <span style="color:#008000;">// Watch out that you don't run "requestLogin()" too much because if you </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum29">  29:</span>             <span style="color:#008000;">// create more than 50 sessionKeys within 1 day you will no longer be able </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum30">  30:</span>             <span style="color:#008000;">// to get a key for 24 hours.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum31">  31:</span>             connection.requestLogin(mobileNumber, password);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum32">  32:</span>             <span style="color:#008000;">// You can alternately just set your sessionKey from the last time you</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum33">  33:</span>             <span style="color:#008000;">// did a requestLogin(). Just store the sessionKey and use that. It</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum34">  34:</span>             <span style="color:#008000;">// is good for 30 days. Uncomment the line below and set your sessionKey.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum35">  35:</span>             <span style="color:#008000;">// connection.setSessionKey("2e08a863-4c57-7af6-92c0-b0a120a16778:32423");</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum36">  36:</span>             </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum37">  37:</span>             System.out.println(<span style="color:#006080;">"Got sessionKey:"</span> + connection.getSessionKey());</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum38">  38:</span>             </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum39">  39:</span>             <span style="color:#008000;">// Set the version to "/" so we use non-signed web service calls</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum40">  40:</span>             connection.apiVersion = <span style="color:#006080;">"/"</span>;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum41">  41:</span>             </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum42">  42:</span>         } <span style="color:#0000ff;">catch</span> (Exception e) {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum43">  43:</span>             System.out.println(<span style="color:#006080;">"Failed to authenticate and get sessionKey to Zipwhip network."</span>);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum44">  44:</span>             <span style="color:#0000ff;">return</span>;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum45">  45:</span>         }</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum46">  46:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum47">  47:</span>         <span style="color:#008000;">// Zipwhip's HTTP web services client library. It uses the connection object for</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum48">  48:</span>         <span style="color:#008000;">// an authenticated transport.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum49">  49:</span>         DefaultZipwhipSubscriptionClient zipwhipSubscrClient;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum50">  50:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum51">  51:</span>         <span style="color:#008000;">// Zipwhip's Socket client.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum52">  52:</span>         JsonSocketSignalClient signalClient;</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum53">  53:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum54">  54:</span>         <span style="color:#008000;">// This will create a high level client object that allows you to perform</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum55">  55:</span>         <span style="color:#008000;">// the full suite of tasks against the Zipwhip network such as send texts,</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum56">  56:</span>         <span style="color:#008000;">// create contacts, create groups, etc.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum57">  57:</span>         zipwhipSubscrClient = <span style="color:#0000ff;">new</span> DefaultZipwhipSubscriptionClient(connection);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum58">  58:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum59">  59:</span>         <span style="color:#008000;">// We will create our TCP/IP socket connection as well. You still need an </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum60">  60:</span>         <span style="color:#008000;">// HTTP client because the Zipwhip API uses HTTP calls in concert with the </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum61">  61:</span>         <span style="color:#008000;">// socket because the socket only pushes signals to you. If you want to</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum62">  62:</span>         <span style="color:#008000;">// send in a command, you do it over the DefaultZipwhipSubscriptionClient </span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum63">  63:</span>         <span style="color:#008000;">// HTTP client.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum64">  64:</span>         signalClient = <span style="color:#0000ff;">new</span> JsonSocketSignalClient(zipwhipSubscrClient);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum65">  65:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum66">  66:</span>         <span style="color:#008000;">// We need to add our callback methods to the socket client so that</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum67">  67:</span>         <span style="color:#008000;">// we can act upon incoming signals.</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum68">  68:</span>         signalClient.addSignalObserver(<span style="color:#0000ff;">new</span> SignalObserver() {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum69">  69:</span>             </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum70">  70:</span>             <span style="color:#008000;">// This method is called when a push socket signal is received</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum71">  71:</span>             @Override</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum72">  72:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> notifySignalReceived(Signal signal) {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum73">  73:</span>                 <span style="color:#008000;">//log.debug("Signal received with uri " + signal.uri);</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum74">  74:</span>                 System.out.println(<span style="color:#006080;">"Signal received with uri "</span> + signal.uri);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum75">  75:</span>                 System.out.println(<span style="color:#006080;">"\t"</span> + signal.rawContent);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum76">  76:</span>             }</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum77">  77:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum78">  78:</span>             @Override</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum79">  79:</span>             <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> notifySignalProviderEvent(<span style="color:#0000ff;">boolean</span> isConnected, String message, <span style="color:#0000ff;">long</span> frameCount) {</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum80">  80:</span>                 System.out.println(<span style="color:#006080;">"Socket status. isConnected:"</span> + isConnected + </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum81">  81:</span>                     <span style="color:#006080;">", msg:"</span> + message + <span style="color:#006080;">", frame:"</span> + frameCount);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum82">  82:</span>             }</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum83">  83:</span>         });</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum84">  84:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum85">  85:</span>         <span style="color:#008000;">// Let's finally call the connect method to actually bind in over TCP/IP</span></pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum86">  86:</span>         signalClient.connect(connection.getSessionKey());</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum87">  87:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum88">  88:</span>         System.out.println(<span style="color:#006080;">"Done with socket test void main(), however socket thread will keep running listening for signals until you kill the process. Thanks for using Zipwhip."</span>);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum89">  89:</span>         </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum90">  90:</span>     }</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum91">  91:</span>&nbsp; </pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum92">  92:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>After you get the source code into Eclipse, your window should look like below. Remember, you can zoom by clicking the image.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_9.png" width="363" height="287"></a></p>
<p>You need to set your mobile number and password before you can run the file. If you don’t have a login to the Zipwhip network, you can get one via your carrier if your carrier is a Zipwhip partner.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_10.png" width="332" height="49"></a></p>
<p>Go ahead and run the code. Just right-click anywhere in the code and choose Run As –&gt; Java Application.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_11.png" width="244" height="55"></a></p>
<p>When the code runs, you should see output in the Console.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_12.png" width="630" height="69"></a></p>
<p>The output in the Console window will be similar to the text below. Don’t worry, I changed the phone numbers and other important details in the output like the sessionKey because those are sensitive items of data.</p>
<div style="border-bottom:silver 1px solid;text-align:left;border-left:silver 1px solid;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;max-height:200px;font-size:8pt;overflow:auto;border-top:silver 1px solid;cursor:text;border-right:silver 1px solid;margin:20px 0 10px;padding:4px;" id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1"> 1:</span> Logging into Zipwhip network with mobile:3134447002, pass:<span style="color:#cc6633;">*</span><span style="color:#cc6633;">*</span><span style="color:#cc6633;">*</span><span style="color:#cc6633;">*</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2"> 2:</span> log4j:WARN No appenders could be found for logger (com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>api<span style="color:#ff0000;">.</span>HttpConnection)<span style="color:#ff0000;">.</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3"> 3:</span> log4j:WARN Please initialize the log4j system properly<span style="color:#ff0000;">.</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4"> 4:</span> Got sessionKey:64abcd3d-9ab6-45ed-aa78-91e4a262169:1</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum5"> 5:</span> Done with socket test void main(), however socket thread will keep running listening for signals until you kill the process<span style="color:#ff0000;">.</span> Thanks for using Zipwhip<span style="color:#ff0000;">.</span></pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum6"> 6:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:false, msg:Connecting<span style="color:#ff0000;">.</span><span style="color:#ff0000;">.</span><span style="color:#ff0000;">.</span>, frame:0</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum7"> 7:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established - Negotiating, frame:0</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum8"> 8:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established, frame:1</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum9"> 9:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established, frame:1</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum10"> 10:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established, frame:2</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum11"> 11:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established, frame:3</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum12"> 12:</span> Signal received with uri /signal/message/receive</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum13"> 13:</span>     {"id":"11218401","content":{"to":"","body":"hey, what's up duder<span style="color:#cc6633;">?</span>","bodySize":21,"visible":true,"transmissionState":{"enumType":"com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>outgoing<span style="color:#ff0000;">.</span>TransmissionState","name":"QUEUED"},"type":"MO","metaDataId":0,"dtoParentId":1,"scheduledDate":null,"thread":"","carrier":"Tmo","deviceId":1,"openMarketMessageId":"","lastName":"Phone","class":"com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>website<span style="color:#ff0000;">.</span>data<span style="color:#ff0000;">.</span>dto<span style="color:#ff0000;">.</span>Message","isParent":false,"lastUpdated":"2011-07-03T22:49:17-07:00","loc":"","messageConsoleLog":"Message created on Sun Jul 03 22:49:17 PDT 2011<span style="color:#ff0000;">.</span> Setting status code to 4 by default","deleted":false,"contactId":2782629,"uuid":"7e397eb-01ca-4f19-9166-b8d431c52cf","isInFinalState":false,"statusDesc":"","cc":"","subject":"","encoded":true,"expectDeliveryReceipt":false,"transferedToCarrierReceipt":null,"version":1,"statusCode":4,"id":118401,"fingerprint":"29091579","parentId":0,"phoneKey":"samSGH-T729","smartForwarded":false,"fromName":null,"isSelf":false,"firstName":"Sidekick","sourceAddress":"2063984565","deliveryReceipt":null,"dishedToOpenMarket":null,"errorState":false,"creatorId":0,"advertisement":null,"bcc":"","fwd":"","contactDeviceId":1,"smartForwardingCandidate":false,"destAddress":"3134447333","DCSId":"not parsed at the moment","latlong":"","new":false,"address":"ptn:/2063982344","dateCreated":"2011-07-03T22:49:27-07:00","UDH":"","carbonedMessageId":-1,"channel":" ","isRead":false},"scope":"device","reason":null,"tag":null,"event":"receive","class":"com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>signals<span style="color:#ff0000;">.</span>Signal","uuid":"787cfec2-d094-4e6d-9b59-d8f55486d","type":"message","uri":"/signal/message/receive"}</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum14"> 14:</span> Socket status<span style="color:#ff0000;">.</span> isConnected:true, msg:Connection Established, frame:4</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum15"> 15:</span> Signal received with uri /signal/conversation/change</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum16"> 16:</span>     {"id":"8312","content":{"lastContactFirstName":"Sidekick","lastContactLastName":"Phone","lastContactDeviceId":0,"unreadCount":2,"bcc":"","lastUpdated":"2011-07-03T22:49:18-07:00","class":"com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>website<span style="color:#ff0000;">.</span>data<span style="color:#ff0000;">.</span>dto<span style="color:#ff0000;">.</span>Conversation","deviceAddress":"device:/3134441232/0","lastNonDeletedMessageDate":"2011-07-03T22:49:27-07:00","deleted":false,"lastContactId":27629,"lastMessageDate":"2011-07-03T22:49:27-07:00","dtoParentId":1,"version":336,"lastContactMobileNumber":"2063981234","id":81312,"fingerprint":"2906579","new":false,"lastMessageBody":"hey, what's up duder<span style="color:#cc6633;">?</span>","address":"ptn:/2063983244","dateCreated":"2011-03-17T22:14:24-07:00","cc":"","deviceId":1},"scope":"device","reason":null,"tag":null,"event":"change","class":"com<span style="color:#ff0000;">.</span>zipwhip<span style="color:#ff0000;">.</span>signals<span style="color:#ff0000;">.</span>Signal","uuid":"787cc2-d094-4e6d-9b59-d8f56d","type":"conversation","uri":"/signal/conversation/change"}</pre>
<p>&nbsp;</p>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum17"> 17:</span></pre>
</div>
</div>
<p>Of course to get the output like that above, you have to send a text message to the phone that you logged in under. Once the text message hits that phone, assuming you have Zipwhip correctly installed on the phone, you will get a text message hitting your application instantaneously. You will see a signal called “/signal/message/receive” popping up in your console window.</p>
<p>That’s it. I hope you’ve enjoyed working with the Zipwhip API using sockets to receive real-time incoming text messages to your phone! Enjoy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=65&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_thumb.png" medium="image">
			<media:title type="html">image_thumb</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb1_thumb.png" medium="image">
			<media:title type="html">image_thumb1</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/Tutorial-Using-the-Zipwhip-API-in-Java-t_AE52/image_thumb_12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Tutorial: Using the Zipwhip API in Java</title>
		<link>http://zipwhip.wordpress.com/2011/06/19/tutorial-using-the-zipwhip-api-in-java/</link>
		<comments>http://zipwhip.wordpress.com/2011/06/19/tutorial-using-the-zipwhip-api-in-java/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 01:37:53 +0000</pubDate>
		<dc:creator>zipwhip</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Zipwhip API]]></category>

		<guid isPermaLink="false">https://zipwhip.wordpress.com/?p=18</guid>
		<description><![CDATA[I’m new to the Zipwhip API so I figured I would share my experience sending out my first text message using the Zipwhip system. To follow along with this article you will need to get your hands on the Zipwhip API as a JAR file. It’s available here for download: Zipwhip API Jar File (170KB) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=18&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’m new to the Zipwhip API so I figured I would share my experience sending out my first text message using the Zipwhip system. To follow along with this article you will need to get your hands on the Zipwhip API as a JAR file. It’s available here for download:</p>
<div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ce4ee714-dd25-41aa-9d42-b5623c47c2c0" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<p>Zipwhip API Jar File (170KB) <a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/ZipwhipAPIJar.zip" target="_blank">ZipwhipAPI.jar</a></p>
</div>
<p>Release Date: 6/18/2011</p>
<p>First, open up Eclipse and make a new Java project.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb.png" alt="image" width="244" height="160" border="0" /></a></p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_3.png" alt="image" width="244" height="56" border="0" /></a></p>
<p>Call the project ZipwhipAPIExample. (BTW, you can zoom in on the screenshots by clicking them.)</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_4.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_4.png" alt="image" width="190" height="244" border="0" /></a></p>
<p>You can leave the Source tab alone, however you will want to add the ZipwhipAPI Jar to the Libraries tab.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_5.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_5.png" alt="image" width="190" height="244" border="0" /></a></p>
<p>Make sure you download the ZipwhipAPI Jar from the link at the start of this article. Then, add it to the Libraries list by choosing “Add External JARs” and finding the file on your local computer. Make sure to add the Log4J Jar file as well since the ZipwhipAPI is dependant upon it. You will get compile errors if you don’t have Log4J somewhere in the build path.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_6.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_6.png" alt="image" width="190" height="244" border="0" /></a></p>
<p>You should now have a new project in your Package Explorer. You are ready to go.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_7.png" alt="image" width="354" height="242" border="0" /></a></p>
<p>Make a new Java class file by right-clicking the src folder and choosing “Class”.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_8.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_8.png" alt="image" width="412" height="120" border="0" /></a></p>
<p>Call your class “Example” after you’ve entered a package name of something like “com.yourcompany.zipwhipapi”. Make sure to also create a public static void main() method so you have an entry point for your Java app.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_9.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_9.png" alt="image" width="321" height="376" border="0" /></a></p>
<p>After you hit “Finish” you should see something similar to the following generated code.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_10.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_10.png" alt="image" width="422" height="288" border="0" /></a></p>
<p>Now, we’ll help you out with the code you should place into the Example.java file in order to send off your first text message using the Zipwhip API. Make sure you set your own mobile number and password in the code. If you don’t know what your password is, or you have never signed up for Zipwhip, you need to do it via your carrier website if your carrier supports Zipwhip. Zipwhip has contracts with most major U.S. carriers so please visit your carrier site or call your carrier to find out how to gain access.</p>
<div id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:1ec5cc03-156e-4a97-b001-b9c05e0bb0ba" class="wlWriterEditableSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<p>Download source code below <a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/Example.zip" target="_blank">Example.java</a></p>
</div>
<div id="codeSnippetWrapper" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:97.5%;font-family:'Courier New', courier, monospace;direction:ltr;height:272px;max-height:200px;font-size:8pt;overflow:auto;cursor:text;border:silver 1px solid;margin:20px 0 10px;padding:4px;">
<div id="codeSnippet" style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;">
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum1" style="color:#606060;"> 1:</span> <span style="color:#0000ff;">package</span> com.yourcompany.zipwhipapi;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum2" style="color:#606060;"> 2:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum3" style="color:#606060;"> 3:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.DefaultZipwhipClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum4" style="color:#606060;"> 4:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.HttpConnection;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum5" style="color:#606060;"> 5:</span> <span style="color:#0000ff;">import</span> com.zipwhip.api.ZipwhipClient;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum6" style="color:#606060;"> 6:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum7" style="color:#606060;"> 7:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> Example {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum8" style="color:#606060;"> 8:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum9" style="color:#606060;"> 9:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> main(String[] args) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum10" style="color:#606060;"> 10:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum11" style="color:#606060;"> 11:</span>         HttpConnection connection = <span style="color:#0000ff;">new</span> HttpConnection();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum12" style="color:#606060;"> 12:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum13" style="color:#606060;"> 13:</span>         String mobileNumber = <span style="color:#006080;">"3135551212"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum14" style="color:#606060;"> 14:</span>         String password = <span style="color:#006080;">"mypassword"</span>;</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum15" style="color:#606060;"> 15:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum16" style="color:#606060;"> 16:</span>         <span style="color:#0000ff;">try</span> {</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum17" style="color:#606060;"> 17:</span>             connection.requestLogin(mobileNumber, password);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum18" style="color:#606060;"> 18:</span>             ZipwhipClient zipwhipClient = <span style="color:#0000ff;">new</span> DefaultZipwhipClient(connection);</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum19" style="color:#606060;"> 19:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum20" style="color:#606060;"> 20:</span>             <span style="color:#008000;">// Ok, go ahead and send your message</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum21" style="color:#606060;"> 21:</span>             zipwhipClient.sendMessage(<span style="color:#006080;">"3134440002"</span>, <span style="color:#006080;">"This is our first test SMS message."</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum22" style="color:#606060;"> 22:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum23" style="color:#606060;"> 23:</span>             System.out.println(<span style="color:#006080;">"Done sending message"</span>);</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum24" style="color:#606060;"> 24:</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum25" style="color:#606060;"> 25:</span>         } <span style="color:#0000ff;">catch</span> (Exception e) {</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum26" style="color:#606060;"> 26:</span>             <span style="color:#008000;">// TODO Auto-generated catch block</span></pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum27" style="color:#606060;"> 27:</span>             e.printStackTrace();</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum28" style="color:#606060;"> 28:</span>         }</pre>
<pre style="text-align:left;line-height:12pt;background-color:white;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum29" style="color:#606060;"> 29:</span>     }</pre>
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span id="lnum30" style="color:#606060;"> 30:</span> }</pre>
</div>
</div>
<p>This is what your Eclipse window should look like when all of the code is done and ready to go.</p>
<p><a href="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_11.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" src="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_11.png" alt="image" width="621" height="487" border="0" /></a></p>
<p>That’s it. Have fun sending off text messages via Zipwhip’s spectacularly simple API. If you want to get fancy, try to use some of the other methods in the API that let you create contacts, create groups, receive messages back, let you setup a URL to be posted to when an SMS comes in, etc.</p>
<p>To learn how to receive text messages via the Zipwhip API <a title="Tutorial: Using the Zipwhip API in Java to Receive Text Messages via Sockets" href="http://zipwhip.wordpress.com/2011/07/03/tutorial-using-the-zipwhip-api-in-java-to-receive-text-messages-via-sockets/">you can read my next posting.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/zipwhip.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/zipwhip.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/zipwhip.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=zipwhip.wordpress.com&amp;blog=24281317&amp;post=18&amp;subd=zipwhip&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://zipwhip.wordpress.com/2011/06/19/tutorial-using-the-zipwhip-api-in-java/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/516ef91f0b19f76b5a6f6415bb6e4e9d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">zipwhip</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://ftp-a1.zipwhip.com/wordpress/0edd418b6002_10518/image_thumb_11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
