<?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/"
	>

<channel>
	<title>Elegando &#187; Java</title>
	<atom:link href="http://elegando.jcg3.org/cat/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegando.jcg3.org</link>
	<description>elegant » being unusually effective and simple...</description>
	<lastBuildDate>Mon, 01 Mar 2010 20:17:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>@SuppressWarnings</title>
		<link>http://elegando.jcg3.org/2008/09/suppresswarnings/</link>
		<comments>http://elegando.jcg3.org/2008/09/suppresswarnings/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 15:36:17 +0000</pubDate>
		<dc:creator>Jason G.</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.elegando.com/2008/09/suppresswarnings/</guid>
		<description><![CDATA[A full list of @SuppressWarnings options (per environment) are available here. In Eclipse&#8230; The list of tokens that can be used inside an SuppressWarning annotation is: all to suppress all warnings boxing to suppress warnings relative to boxing/unboxing operations cast to suppress warnings relative to cast operations dep-ann to suppress warnings relative to deprecated annotation [...]]]></description>
			<content:encoded><![CDATA[<p>A full list of @SuppressWarnings options (per environment) <a href="http://knol.google.com/k/alex-miller/suppresswarnings-annotation-in-java/1f092vcri65lh/3#">are available here</a>.</p>
<p><a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm">In Eclipse&#8230;</a> The list of tokens that can be used inside an SuppressWarning annotation is:</p>
<ul>
<li><strong><span style="font-weight: normal;"><strong>all</strong> to suppress all warnings</span></strong></li>
<li><span style="font-weight: normal;"><strong>boxing</strong> to suppress warnings relative to boxing/unboxing operations</span></li>
<li><span style="font-weight: normal;"><strong>cast</strong> to suppress warnings relative to cast operations</span></li>
<li><span style="font-weight: normal;"><strong>dep-an</strong><strong>n</strong> to suppress warnings relative to deprecated annotation</span></li>
<li><span style="font-weight: normal;"><strong>deprecation</strong> to suppress warnings relative to deprecation</span></li>
<li><span style="font-weight: normal;"><strong>fallthrough</strong> to suppress warnings relative to missing breaks in switch statements</span></li>
<li><span style="font-weight: normal;"><strong>finally</strong> to suppress warnings relative to finally block that don&#8217;t return</span></li>
<li><span style="font-weight: normal;"><strong>hiding</strong> to suppress warnings relative to locals that hide variable</span></li>
<li><span style="font-weight: normal;"><strong>incomplete-switch</strong> to suppress warnings relative to missing entries in a switch statement (enum case)</span></li>
<li><span style="font-weight: normal;"><strong>nls</strong> to suppress warnings relative to non-nls string literals</span></li>
<li><span style="font-weight: normal;"><strong>null</strong> to suppress warnings relative to null analysis</span></li>
<li><span style="font-weight: normal;"><strong>restriction</strong> to suppress warnings relative to usage of discouraged or forbidden references</span></li>
<li><span style="font-weight: normal;"><strong>serial</strong> to suppress warnings relative to missing serialVersionUID field for a serializable class</span></li>
<li><span style="font-weight: normal;"><strong>static-access</strong> to suppress warnings relative to incorrect static access</span></li>
<li><span style="font-weight: normal;"><strong>synthetic-access</strong> to suppress warnings relative to unoptimized access from inner classes</span></li>
<li><span style="font-weight: normal;"><strong>unchecked</strong> to suppress warnings relative to unchecked operations</span></li>
<li><span style="font-weight: normal;"><strong>unqualified-field-access</strong> to suppress warnings relative to field access unqualified</span></li>
<li><span style="font-weight: normal;"><strong>unused</strong> to suppress warnings relative to unused code</span></li>
</ul>
<p>The Sun JDK has seven categories (<a href="http://tech.puredanger.com/2007/01/05/suppresswarnings/">as mentioned here</a>): all, deprecation, unchecked, fallthrough, path, serial, and finally.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegando.jcg3.org/2008/09/suppresswarnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove Non-ASCII Chars</title>
		<link>http://elegando.jcg3.org/2008/08/remove-non-ascii-chars/</link>
		<comments>http://elegando.jcg3.org/2008/08/remove-non-ascii-chars/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 12:40:53 +0000</pubDate>
		<dc:creator>Jason G.</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.elegando.com/2008/08/remove-non-ascii-chars/</guid>
		<description><![CDATA[Quick snippet to remove non-ascii characters from a java string: String clean = dirty.replaceAll("\\P{ASCII}+", "");]]></description>
			<content:encoded><![CDATA[<p>Quick snippet to remove non-ascii characters from a java string:</p>
<p><pre name="code" class="java">
String clean = dirty.replaceAll("\\P{ASCII}+", "");
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://elegando.jcg3.org/2008/08/remove-non-ascii-chars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail from Java</title>
		<link>http://elegando.jcg3.org/2008/08/mail-from-java/</link>
		<comments>http://elegando.jcg3.org/2008/08/mail-from-java/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 04:53:35 +0000</pubDate>
		<dc:creator>Jason G.</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.elegando.com/2008/08/mail-from-java/</guid>
		<description><![CDATA[Sometimes you gotta send mail from outside an app server, in which case, this will get you started: Sending Mail with the JavaMail API You will need the JavaMail library (mail.jar) as well as the Java Activation Framework (activation.jar) to get it running&#8230; public MailSender() { Properties props = new Properties(); props.put("mail.smtp.host", "mail.yourhostnamehere.com"); session = [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you gotta send mail from outside an app server, in which case, this will get you started:</p>
<p><a href="http://java.sun.com/developer/JDCTechTips/2001/tt1023.html#tip2">Sending Mail with the JavaMail API</a></p>
<p>You will need the <a href="http://java.sun.com/products/javamail/index.jsp">JavaMail library</a> (mail.jar) as well as the <a href="http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp">Java Activation Framework</a> (activation.jar) to get it running&#8230;</p>
<p><span id="more-68"></span></p>
<pre name="code" class="java">
	public MailSender() {
	    Properties props = new Properties();
	    props.put("mail.smtp.host", "mail.yourhostnamehere.com");
	    session = Session.getDefaultInstance(props, null);
	}

	public boolean sendEmail( String to, String from, String subject, String body ) {
		try {
			Message message = new MimeMessage( session );
			message.setFrom( new InternetAddress( from ) );
			message.addRecipient( RecipientType.TO, new InternetAddress( to ) );
			message.setSubject( subject );
			message.setText( body );

			Transport.send( message );
			return true;
		} catch( AddressException e ) {
			log.error( "ERROR Occurred:", e );
			e.printStackTrace();
		} catch( MessagingException e ) {
			log.error( "ERROR Occurred:", e );
			e.printStackTrace();
		}
		return false;
	}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://elegando.jcg3.org/2008/08/mail-from-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Profiler</title>
		<link>http://elegando.jcg3.org/2008/01/java-profiler/</link>
		<comments>http://elegando.jcg3.org/2008/01/java-profiler/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 16:17:57 +0000</pubDate>
		<dc:creator>Jason G.</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.elegando.com/2008/01/java-profiler/</guid>
		<description><![CDATA[The Java Profiler to use is apparently YourKit. It&#8217;s very reasonable at $500 per license. It&#8217;s also worth checking open source options, but you can also get a free 15 day eval of YourKit.]]></description>
			<content:encoded><![CDATA[<p>The Java Profiler to use is apparently <a href="http://www.yourkit.com/download/index.jsp">YourKit</a>.  It&#8217;s very reasonable at $500 per license.  It&#8217;s also worth checking <a href="http://java-source.net/open-source/profilers">open source options</a>, but you can also get a free 15 day eval of YourKit.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegando.jcg3.org/2008/01/java-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EJB Annotation Cheat Sheet</title>
		<link>http://elegando.jcg3.org/2007/11/ejb-annotation-cheat-sheet/</link>
		<comments>http://elegando.jcg3.org/2007/11/ejb-annotation-cheat-sheet/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 16:16:11 +0000</pubDate>
		<dc:creator>Jason G.</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.elegando.com/2007/11/ejb-annotation-cheat-sheet/</guid>
		<description><![CDATA[Philipp Meier put together an excellent EJB Annotation Cheat Sheet for version 3.0.]]></description>
			<content:encoded><![CDATA[<p>Philipp Meier put together an excellent <a href="http://www.fnogol.de/archives/2005/05/13/ejb-30-annotations-cheat-sheet/">EJB Annotation Cheat Sheet for version 3.0</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegando.jcg3.org/2007/11/ejb-annotation-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
