<?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>web development helpdesk &#187; conversion</title>
	<atom:link href="http://helpdesk.objects.com.au/tag/conversion/feed" rel="self" type="application/rss+xml" />
	<link>http://helpdesk.objects.com.au</link>
	<description>objects quality - the visible difference</description>
	<lastBuildDate>Sun, 17 Jul 2011 12:27:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>How to parse a binary String?</title>
		<link>http://helpdesk.objects.com.au/java/how-to-parse-a-binary-string?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-parse-a-binary-string</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-parse-a-binary-string#comments</comments>
		<pubDate>Thu, 10 Jun 2010 23:44:31 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[parse]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1496</guid>
		<description><![CDATA[You can tell the parseInt() method what base number system is used by the String that is being parsed. String hex = &#34;01001101&#34;; int n = Integer.parseInt(hex, 2); Related posts: How to parse a hex string? You can tell the parseInt() method what base number system... Converting large byte array to binary string You can [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-parse-a-binary-string/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting large byte array to binary string</title>
		<link>http://helpdesk.objects.com.au/java/converting-large-byte-array-to-binary-string?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=converting-large-byte-array-to-binary-string</link>
		<comments>http://helpdesk.objects.com.au/java/converting-large-byte-array-to-binary-string#comments</comments>
		<pubDate>Wed, 02 Jun 2010 04:01:41 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigInteger]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[byte]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[StringBuilder]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1489</guid>
		<description><![CDATA[You can use BigInteger class to convert a byte array into its hex (or binary) representation. However for large byte arrays this method is slow. For large byte arrays and where performance is important you can use the following utility method to convert each byte to its binary representation. public static String toBinaryString(byte n) { [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/converting-large-byte-array-to-binary-string/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to convert byte array to long</title>
		<link>http://helpdesk.objects.com.au/java/how-to-convert-byte-array-to-long?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-convert-byte-array-to-long</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-convert-byte-array-to-long#comments</comments>
		<pubDate>Tue, 17 Nov 2009 21:25:27 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[byte array]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[long]]></category>
		<category><![CDATA[representation]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1291</guid>
		<description><![CDATA[The following code can be used to convert a byte array (containing the bytes of a long) into a long. public static long byteArrayToLong(byte[] bytes) { long l = 0; for (int i=0; i&#60;8; i++) { l &#60;&#60;= 8; l ^= (long) bytes[i] &#38; 0xff; } return l; } This is the reverse of &#8220;How [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-convert-byte-array-to-long/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to convert double to byte array</title>
		<link>http://helpdesk.objects.com.au/java/how-to-convert-double-to-byte-array?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-convert-double-to-byte-array</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-convert-double-to-byte-array#comments</comments>
		<pubDate>Fri, 15 May 2009 23:52:48 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[IEEE 754]]></category>
		<category><![CDATA[representation]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1159</guid>
		<description><![CDATA[The Double class contains two methods that return a representation of a floating point value according to the IEEE 754 floating-point &#8220;double format&#8221; bit layout. The first, doubleToLongBits() does not preserve NaN and returns it as 0x7ff8000000000000L. The second, doubleToRawLongBits() does preserve NaN and returns the representation of the actual NaN value. The long returned [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-convert-double-to-byte-array/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to convert a long to a byte array</title>
		<link>http://helpdesk.objects.com.au/java/how-to-convert-a-long-to-a-byte-array?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-convert-a-long-to-a-byte-array</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-convert-a-long-to-a-byte-array#comments</comments>
		<pubDate>Fri, 15 May 2009 23:03:23 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[byte array]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[long]]></category>
		<category><![CDATA[representation]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1161</guid>
		<description><![CDATA[The following code can be used to extract the 8 bytes from a long value and return them as a byte array public static byte[] longToByteArray(long data) { return new byte[] { (byte)((data &#62;&#62; 56) &#38; 0xff), (byte)((data &#62;&#62; 48) &#38; 0xff), (byte)((data &#62;&#62; 40) &#38; 0xff), (byte)((data &#62;&#62; 32) &#38; 0xff), (byte)((data &#62;&#62; 24) [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-convert-a-long-to-a-byte-array/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rounding strategy used by DecimalFormat?</title>
		<link>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rounding-strategy-used-by-decimalformat</link>
		<comments>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat#comments</comments>
		<pubDate>Mon, 23 Feb 2009 08:57:33 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[rounding]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=811</guid>
		<description><![CDATA[Decimal format uses BigDecimal.ROUND_HALF_EVEN and prior to 1.6 this cannot be changed. In 1.6 a setRoundingMethod() was added to allow the rounding strategy to be changed. DecimalFormat df = NumberFormat.getNumberInstance(); df.setRoundingMode(1, RoundingMode.HALF_UP); String formatted = df.format(12.345); If you need an alternate rounding strategy prior to 1.6 then you need to use BigDecimal to do your [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to convert a number into words using Java?</title>
		<link>http://helpdesk.objects.com.au/java/how-to-convert-a-number-into-words-using-java?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-convert-a-number-into-words-using-java</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-convert-a-number-into-words-using-java#comments</comments>
		<pubDate>Sat, 31 Jan 2009 03:49:52 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=729</guid>
		<description><![CDATA[The following example shows how recusion can be used to convert any number from 0 to 99 into words. eg. NumberToWords.numberToWords(34) returns &#8220;Thirty Four&#8221;. public class NumberToWords { private static final String[] ONES = { &#34;Zero&#34;, &#34;One&#34;, &#34;Two&#34;, &#34;Three&#34;, &#34;Four&#34;, &#34;Five&#34;, &#34;Six&#34;, &#34;Seven&#34;, &#34;Eight&#34;, &#34;Nine&#34; }; private static final String[] TEENS = { &#34;Ten&#34;, &#34;Eleven&#34;, [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-convert-a-number-into-words-using-java/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>How do I convert a String to an enum?</title>
		<link>http://helpdesk.objects.com.au/java/how-do-i-convert-a-string-to-an-enum?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-convert-a-string-to-an-enum</link>
		<comments>http://helpdesk.objects.com.au/java/how-do-i-convert-a-string-to-an-enum#comments</comments>
		<pubDate>Wed, 03 Dec 2008 22:04:24 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[enum]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=600</guid>
		<description><![CDATA[Use the static valueOf() method enum Colour { red, green, blue } Colour red = Colour.valueOf(&#34;red&#34;); Related posts: How to lookup an Enum value Often we need to lookup an enum value based on... How to convert a String to an Integer in Java? se static method java.lang.Integer.valueOf(), or create java.lang.Integer instance directly using... How [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-do-i-convert-a-string-to-an-enum/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I convert a byte array to a hex string representation?</title>
		<link>http://helpdesk.objects.com.au/java/how-can-i-convert-a-byte-array-to-a-hex-string-representation?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-can-i-convert-a-byte-array-to-a-hex-string-representation</link>
		<comments>http://helpdesk.objects.com.au/java/how-can-i-convert-a-byte-array-to-a-hex-string-representation#comments</comments>
		<pubDate>Mon, 13 Oct 2008 00:19:52 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[BigInteger]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[hex]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=434</guid>
		<description><![CDATA[You have a couple of choices, either: Loop thru the array to convert each byte individually, or Use the toString() method of the BigInteger class // using a loop StringBuilder sb = new StringBuilder(bytes.length * 2); for (int i=0; i&#60; bytes.length; i++) { sb.append(String.format(&#34;%02x&#34;, bytes[i])); } String hex1 = sb.toString(); // using BigInteger BigInteger bi [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-can-i-convert-a-byte-array-to-a-hex-string-representation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I get a String representation of a Java array?</title>
		<link>http://helpdesk.objects.com.au/java/how-can-i-get-a-string-representation-of-a-java-array?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-can-i-get-a-string-representation-of-a-java-array</link>
		<comments>http://helpdesk.objects.com.au/java/how-can-i-get-a-string-representation-of-a-java-array#comments</comments>
		<pubDate>Wed, 08 Oct 2008 10:10:38 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=416</guid>
		<description><![CDATA[Use the toString() method of the Arrays utility class. Object[] array = new Object[] { &#34;abc&#34;, &#34;123&#34;, &#34;test&#34; }; String s = Arrays.toString(array); // s is now &#34;[abc, 123, test]&#34; Related posts: How can I convert a byte array to a hex string representation? You have a couple of choices, either: Loop thru the... How [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-can-i-get-a-string-representation-of-a-java-array/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

