<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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: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>Comments for Closing Braces</title>
	<atom:link href="http://closingbraces.net/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://closingbraces.net</link>
	<description>After-hours notes and opinions on Java and system development</description>
	<lastBuildDate>Wed, 11 Jan 2012 18:00:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Java Enum as Singleton: Good or Bad? by pranav</title>
		<link>http://closingbraces.net/2011/07/04/enum-as-singleton/#comment-4690</link>
		<dc:creator><![CDATA[pranav]]></dc:creator>
		<pubDate>Wed, 11 Jan 2012 18:00:47 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/?p=282#comment-4690</guid>
		<description><![CDATA[Very nice article and explanation for enum and singleton, because two concepts are confusing ... but this article explains it greatly. I would also like to share one link about &lt;a href=&quot;http://tutiez.com/enum-in-java-with-java-enum-examples.html&quot; rel=&quot;nofollow&quot;&gt;enum in java&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Very nice article and explanation for enum and singleton, because two concepts are confusing &#8230; but this article explains it greatly. I would also like to share one link about <a href="http://tutiez.com/enum-in-java-with-java-enum-examples.html" rel="nofollow">enum in java</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beware of using java.util.Scanner with &#8220;/z&#8221; by closingbraces</title>
		<link>http://closingbraces.net/2011/12/17/scanner-with-z-regex/#comment-4689</link>
		<dc:creator><![CDATA[closingbraces]]></dc:creator>
		<pubDate>Tue, 10 Jan 2012 22:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.wordpress.com/?p=316#comment-4689</guid>
		<description><![CDATA[Thanks Jacob. 

I&#039;d also experimented with \Z (end of input apart from final terminator, if any), just to see if that was any different (it isn&#039;t). But I&#039;d not seen the \A idea before... interesting, if somewhat unintuitive!

So just out of interest I set up a quick experiment to try \A, and it does seem to work correctly even with a SequenceInputStream (tried this on Oracle JDK 5, 6 and 7).

However, a quick run of some other tests seems to show that using \A throws a &quot;NoSuchElementException&quot; (with no message or cause) if an IOException occurs at the start of the input or when trying to close the input. This contrasts with the more usual behavior of storing the IOException for subsequent checking/retrieval and treating the input as terminated (but without then treating that as a separate and immediate &quot;not found&quot; exception).

So a single \A does seem to work, at least on the particular thing I&#039;ve seen a single \z fail on, but it may need somewhat different error handling and may result in less clear exception messages in some situations.

Anyway, after seeing what happens with \z, I still don&#039;t think I&#039;d entirely trust a single \A read either!]]></description>
		<content:encoded><![CDATA[<p>Thanks Jacob. </p>
<p>I&#8217;d also experimented with \Z (end of input apart from final terminator, if any), just to see if that was any different (it isn&#8217;t). But I&#8217;d not seen the \A idea before&#8230; interesting, if somewhat unintuitive!</p>
<p>So just out of interest I set up a quick experiment to try \A, and it does seem to work correctly even with a SequenceInputStream (tried this on Oracle JDK 5, 6 and 7).</p>
<p>However, a quick run of some other tests seems to show that using \A throws a &#8220;NoSuchElementException&#8221; (with no message or cause) if an IOException occurs at the start of the input or when trying to close the input. This contrasts with the more usual behavior of storing the IOException for subsequent checking/retrieval and treating the input as terminated (but without then treating that as a separate and immediate &#8220;not found&#8221; exception).</p>
<p>So a single \A does seem to work, at least on the particular thing I&#8217;ve seen a single \z fail on, but it may need somewhat different error handling and may result in less clear exception messages in some situations.</p>
<p>Anyway, after seeing what happens with \z, I still don&#8217;t think I&#8217;d entirely trust a single \A read either!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Beware of using java.util.Scanner with &#8220;/z&#8221; by Jacob Kjome</title>
		<link>http://closingbraces.net/2011/12/17/scanner-with-z-regex/#comment-4688</link>
		<dc:creator><![CDATA[Jacob Kjome]]></dc:creator>
		<pubDate>Tue, 10 Jan 2012 20:14:46 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.wordpress.com/?p=316#comment-4688</guid>
		<description><![CDATA[Have you tried using &quot;\\A&quot; as the delimiter?  I haven&#039;t verified whether it resolves issues with &quot;SequenceInputStream&quot; or not, but I thought I&#039;d mention it.  I came across this technique by reading a blog post [1] by Pat Niemeyer.  He states &quot;this effectively tells Scanner to tokenize the entire stream, from beginning to (illogical) next beginning&quot;.  So...

String text = new Scanner( source ).useDelimiter(&quot;\\A&quot;).next();

[1] http://weblogs.java.net/blog/pat/archive/2004/10/stupid_scanner.html]]></description>
		<content:encoded><![CDATA[<p>Have you tried using &#8220;\\A&#8221; as the delimiter?  I haven&#8217;t verified whether it resolves issues with &#8220;SequenceInputStream&#8221; or not, but I thought I&#8217;d mention it.  I came across this technique by reading a blog post [1] by Pat Niemeyer.  He states &#8220;this effectively tells Scanner to tokenize the entire stream, from beginning to (illogical) next beginning&#8221;.  So&#8230;</p>
<p>String text = new Scanner( source ).useDelimiter(&#8220;\\A&#8221;).next();</p>
<p>[1] <a href="http://weblogs.java.net/blog/pat/archive/2004/10/stupid_scanner.html" rel="nofollow">http://weblogs.java.net/blog/pat/archive/2004/10/stupid_scanner.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on In memory of CESIL by Yorick Phoenix</title>
		<link>http://closingbraces.net/2010/01/18/in-memory-of-cesil/#comment-4676</link>
		<dc:creator><![CDATA[Yorick Phoenix]]></dc:creator>
		<pubDate>Sun, 13 Nov 2011 06:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/?p=230#comment-4676</guid>
		<description><![CDATA[I think - and have always felt - that it is important for programmers to understand how computers work and what better way than to start at the machine level with an assembler or a simple simulator like CESIL. I cut my teeth with it in 1975 then went on to Basic, Fortran, PL/1, Z80, Lisp, etc. When I needed to learn 6502, 68000 and work in PowerPC assembly for some interrupt routines I wasn&#039;t phased because I had started at this level. Start at C++ or Java and Assembly or Hardware Interrupts will scare you. You can go higher-level but it is harder to go lower-level if you haven&#039;t already been there.]]></description>
		<content:encoded><![CDATA[<p>I think &#8211; and have always felt &#8211; that it is important for programmers to understand how computers work and what better way than to start at the machine level with an assembler or a simple simulator like CESIL. I cut my teeth with it in 1975 then went on to Basic, Fortran, PL/1, Z80, Lisp, etc. When I needed to learn 6502, 68000 and work in PowerPC assembly for some interrupt routines I wasn&#8217;t phased because I had started at this level. Start at C++ or Java and Assembly or Hardware Interrupts will scare you. You can go higher-level but it is harder to go lower-level if you haven&#8217;t already been there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Java&#8217;s String.trim has a strange idea of whitespace by Tim McCormack</title>
		<link>http://closingbraces.net/2008/11/11/javastringtrim/#comment-4675</link>
		<dc:creator><![CDATA[Tim McCormack]]></dc:creator>
		<pubDate>Fri, 26 Aug 2011 17:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://closingbraces.net/?p=110#comment-4675</guid>
		<description><![CDATA[I&#039;m finding [\p{javaWhitespace}\p{Zs}] to be a pretty good range for trimming whitespace. As a utility class: https://gist.github.com/1173941]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m finding [\p{javaWhitespace}\p{Zs}] to be a pretty good range for trimming whitespace. As a utility class: <a href="https://gist.github.com/1173941" rel="nofollow">https://gist.github.com/1173941</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

