<?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>Kushal&#039;s Java Blog &#124; Software Engineering Blog</title>
	<atom:link href="http://sanjaal.com/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://sanjaal.com/java</link>
	<description>www.sanjaal.com/java</description>
	<lastBuildDate>Fri, 03 Sep 2010 03:03:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>BBCode Appender On Line Of Text &#8211; Java Utility &#8211; Sample Tutorial</title>
		<link>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/</link>
		<comments>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 03:03:58 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java File]]></category>
		<category><![CDATA[Java General]]></category>
		<category><![CDATA[Java Utilities]]></category>
		<category><![CDATA[BBCode For PHPBB JAVA]]></category>
		<category><![CDATA[File Append]]></category>
		<category><![CDATA[file read]]></category>
		<category><![CDATA[file write]]></category>
		<category><![CDATA[Java BBCode Appender]]></category>
		<category><![CDATA[Java Free Utility to Append BBcode To Line Of TExt]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=217</guid>
		<description><![CDATA[How it began? When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up. The Problem: Then I started an imagehost service which would give me a bunch of codes for the images [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Category Chart Using JFreeChart</title>
		<link>http://sanjaal.com/java/86/charts-in-java/creating-category-chart-using-jfreechart/</link>
		<comments>http://sanjaal.com/java/86/charts-in-java/creating-category-chart-using-jfreechart/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 14:38:42 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Charts In Java]]></category>
		<category><![CDATA[Category Chart]]></category>
		<category><![CDATA[creating category bar chart in java]]></category>
		<category><![CDATA[creating category bar chart source code]]></category>
		<category><![CDATA[Creating Charts In Java Example]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[java category bar chart]]></category>
		<category><![CDATA[java category bar chart using jfreechart]]></category>
		<category><![CDATA[Java Charts 3D]]></category>
		<category><![CDATA[Java Charts Demo]]></category>
		<category><![CDATA[Java Charts Graph]]></category>
		<category><![CDATA[Java Code]]></category>
		<category><![CDATA[Java Free Charts]]></category>
		<category><![CDATA[Java Snippet]]></category>
		<category><![CDATA[Java Tutorial]]></category>
		<category><![CDATA[JFree Chart Tutorial Chart]]></category>
		<category><![CDATA[jfree chart tutorial java blog]]></category>
		<category><![CDATA[JFreeChart]]></category>
		<category><![CDATA[JFreeChart Chart Example Code]]></category>
		<category><![CDATA[JFreeChart Dataset]]></category>
		<category><![CDATA[JFreeChart Examples]]></category>
		<category><![CDATA[JFreeChart Samples]]></category>
		<category><![CDATA[JFreeChart Tutorial]]></category>
		<category><![CDATA[jfreechart usage example source code]]></category>
		<category><![CDATA[org.jfree.chart example]]></category>
		<category><![CDATA[Sample]]></category>
		<category><![CDATA[Simple Graph Tutorial]]></category>
		<category><![CDATA[Simple Java Tutorial]]></category>
		<category><![CDATA[Simple JFreeChart Tutorial]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=86</guid>
		<description><![CDATA[In this basic tutorial, I am walking through how to create category chart using JFreeChart. The program uses the following two jar files, and they come with the JFreeChart itself. You can download JFreeChart at their official website www.jfreechart.org jcommon-1.0.15.jar jfreechart-1.0.12.jar The program also demonstrates how easily you can save a generated chart to your [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Converting Java Object To SOAP Request And Response XML</title>
		<link>http://sanjaal.com/java/242/j2ee/converting-java-object-to-soap-request-and-response-xml/</link>
		<comments>http://sanjaal.com/java/242/j2ee/converting-java-object-to-soap-request-and-response-xml/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 02:19:45 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java And XML]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[Basic Functioning of SOAP]]></category>
		<category><![CDATA[Benefits Of Using SOAP]]></category>
		<category><![CDATA[Drawbacks Of Using SOAP]]></category>
		<category><![CDATA[Java SOAP Example]]></category>
		<category><![CDATA[Java SOAP Tutorial]]></category>
		<category><![CDATA[Java SOAP XML Example]]></category>
		<category><![CDATA[Java SOAP XML Tutorial]]></category>
		<category><![CDATA[Message Exchange Patters (MEP) in SOAP]]></category>
		<category><![CDATA[Simple Object Access Protocol (SOAP)]]></category>
		<category><![CDATA[SOAP Advantages]]></category>
		<category><![CDATA[SOAP and XML]]></category>
		<category><![CDATA[SOAP Diagram]]></category>
		<category><![CDATA[SOAP Disadvantages]]></category>
		<category><![CDATA[SOAP in Java]]></category>
		<category><![CDATA[SOAP in Webservices]]></category>
		<category><![CDATA[SOAP Platform And Language Independent]]></category>
		<category><![CDATA[SOAP With RPC and HTTP]]></category>
		<category><![CDATA[Webservice Diagram]]></category>
		<category><![CDATA[WSDL Diagram]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=242</guid>
		<description><![CDATA[To give you the basic idea about SOAP, the transport of messages in the SOAP and to point out the advantage and disadvantages of SOAP, I have brought the following text from Wikipedia. Following the text is my tutorial on how simply you can transfer a Java object to a SOAP XML and how to [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Read DOC file Using Java and Apache POI</title>
		<link>http://sanjaal.com/java/120/java-file/how-to-read-doc-file-using-java-and-apache-poi/</link>
		<comments>http://sanjaal.com/java/120/java-file/how-to-read-doc-file-using-java-and-apache-poi/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 14:11:45 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java And Office Document]]></category>
		<category><![CDATA[Java File]]></category>
		<category><![CDATA[download code to read document in java]]></category>
		<category><![CDATA[How to read doc file using Apache POI]]></category>
		<category><![CDATA[How to read doc file using Java]]></category>
		<category><![CDATA[How to read document footer]]></category>
		<category><![CDATA[How to read document Header]]></category>
		<category><![CDATA[How to read the document summary]]></category>
		<category><![CDATA[Java and .docx format]]></category>
		<category><![CDATA[poi-scratchpad-3.2-FINAL-20081019.jar]]></category>
		<category><![CDATA[Read .doc using Java]]></category>
		<category><![CDATA[Read office document using Java]]></category>
		<category><![CDATA[Sample Examples To Read Word Document In Java]]></category>
		<category><![CDATA[simple java tutorial to read microsoft document in java]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=120</guid>
		<description><![CDATA[One of the visitors of my blog asked me write how to read a document file using Java. I wrote the following program to demonstrate how Apache POI can be used for this purpose. I have used the following API to write this program. If you have downloaded the Apache POI, you should fine this [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listing The Content Of Zip File With Zip Information In Java</title>
		<link>http://sanjaal.com/java/154/java-zipunzip/listing-the-content-of-zip-file-with-zip-information-in-java/</link>
		<comments>http://sanjaal.com/java/154/java-zipunzip/listing-the-content-of-zip-file-with-zip-information-in-java/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 01:52:36 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java Zip/Unzip]]></category>
		<category><![CDATA[Calculate CRC In Java Zip]]></category>
		<category><![CDATA[Converting CRC In ZIP To Hex In Java]]></category>
		<category><![CDATA[Java Compression]]></category>
		<category><![CDATA[Java Decompression]]></category>
		<category><![CDATA[JAVA Get Zip Comment]]></category>
		<category><![CDATA[Java Get Zip Compressed Size]]></category>
		<category><![CDATA[JAVA Get Zip Name]]></category>
		<category><![CDATA[Java Get Zip Uncompressed Size]]></category>
		<category><![CDATA[Java Tutorial To List Content Of Zip Files]]></category>
		<category><![CDATA[Java Zip Content Display]]></category>
		<category><![CDATA[Java Zip Content Listing]]></category>
		<category><![CDATA[Java Zip File]]></category>
		<category><![CDATA[Java Zip Info]]></category>
		<category><![CDATA[Java ZipEntry]]></category>
		<category><![CDATA[Populate Zip Information In Java]]></category>
		<category><![CDATA[Zipping In JAVA]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=154</guid>
		<description><![CDATA[The main objective of this tutorial is to show how to list  the content of a zip file along with zipping information. The program shows you: How to iterate through the list of content of a zip file How to get the name of the individual zip entry How to get the compressed file size [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Way Password Encryption Using Java</title>
		<link>http://sanjaal.com/java/134/java-encryption/one-way-password-encryption-using-java/</link>
		<comments>http://sanjaal.com/java/134/java-encryption/one-way-password-encryption-using-java/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 13:27:49 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java - Encryption]]></category>
		<category><![CDATA[Base64Encoder]]></category>
		<category><![CDATA[Hash Cryptography]]></category>
		<category><![CDATA[Java Character Encoding]]></category>
		<category><![CDATA[Java Encryption Using MD5]]></category>
		<category><![CDATA[Java Message Digest]]></category>
		<category><![CDATA[Java Message Digest Algorithm]]></category>
		<category><![CDATA[Java Password Encryption]]></category>
		<category><![CDATA[Java Sha]]></category>
		<category><![CDATA[Md5]]></category>
		<category><![CDATA[One Way Hash Encryption]]></category>
		<category><![CDATA[One Way Password Encryption Using Java]]></category>
		<category><![CDATA[Password Encryption]]></category>
		<category><![CDATA[Password Encryption Using SHA]]></category>
		<category><![CDATA[Secure Hash Algorithm]]></category>
		<category><![CDATA[Sha]]></category>
		<category><![CDATA[Simple Java Tutorial Password Encryption]]></category>
		<category><![CDATA[Utf 8]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=134</guid>
		<description><![CDATA[Wonder how your passwords are generally stored by the web applications? One thing for sure, they are not stored as plain text, if the developers out there care about your password security. In this little Java Tutorial, I would like to demonstrate how to generate an encrypted password that can be stored in the database [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Set And Get System Clipboard Contents In Java</title>
		<link>http://sanjaal.com/java/224/java-utilities/how-to-set-and-get-system-clipboard-contents-in-java/</link>
		<comments>http://sanjaal.com/java/224/java-utilities/how-to-set-and-get-system-clipboard-contents-in-java/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 00:58:54 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java Data Transfer]]></category>
		<category><![CDATA[Java Utilities]]></category>
		<category><![CDATA[Get System Clipboard In Java]]></category>
		<category><![CDATA[How To Get System Clipboard In Java]]></category>
		<category><![CDATA[How To Set System Clipboard In Java]]></category>
		<category><![CDATA[How To Write Text To System Clipboard In Java]]></category>
		<category><![CDATA[Java Clipboard Example]]></category>
		<category><![CDATA[Java Clipboard Get Content]]></category>
		<category><![CDATA[Java Clipboard Sample]]></category>
		<category><![CDATA[Java Clipboard Set Content]]></category>
		<category><![CDATA[Java Clipboard Tutorial]]></category>
		<category><![CDATA[Java System Clipboard]]></category>
		<category><![CDATA[Reference System Clipboard In Java]]></category>
		<category><![CDATA[Set System Clipboard In Java]]></category>
		<category><![CDATA[Simple Tutorial Java Clipboard]]></category>
		<category><![CDATA[System Clipboard In Java]]></category>
		<category><![CDATA[Toolkit.getDefaultToolkit().getSystemClipboard()]]></category>
		<category><![CDATA[Using The System Clipboard In Java]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=224</guid>
		<description><![CDATA[The clipboard is a software facility that can be used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations. It is most commonly a part of a GUI environment and is usually implemented as an anonymous, temporary block of memory that can be accessed from most or all [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Where is the JVM Dump file physically located in JBoss Server environment?</title>
		<link>http://sanjaal.com/java/612/jboss/where-is-the-jvm-dump-file-physically-located-in-jboss-server-environment/</link>
		<comments>http://sanjaal.com/java/612/jboss/where-is-the-jvm-dump-file-physically-located-in-jboss-server-environment/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 14:58:28 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[JBoss]]></category>
		<category><![CDATA[java core dump]]></category>
		<category><![CDATA[java unhandled exception jboss]]></category>
		<category><![CDATA[javacore]]></category>
		<category><![CDATA[jboss 4.0.5 dump file]]></category>
		<category><![CDATA[jboss dump file]]></category>
		<category><![CDATA[jboss jvm dump file folder]]></category>
		<category><![CDATA[jboss jvm dump file location]]></category>
		<category><![CDATA[jvm dump]]></category>
		<category><![CDATA[jvm dump snapshot]]></category>
		<category><![CDATA[location of jvm dump file]]></category>
		<category><![CDATA[physical location of jboss jvm dump file]]></category>
		<category><![CDATA[where is jboss jvm dump file located]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=612</guid>
		<description><![CDATA[I was debugging an enterprise application at my office today and suddenly got a heap dump &#8211; so I thought of creating a new post in this blog about the location of the JVM dump file in JBoss 4.0.5 server along with the stack trace of the error (and what other files are created during [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>22 Ways To JBoss Performance Tuning</title>
		<link>http://sanjaal.com/java/137/jboss/22-ways-to-jboss-performance-tuning/</link>
		<comments>http://sanjaal.com/java/137/jboss/22-ways-to-jboss-performance-tuning/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 12:46:33 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[JBoss]]></category>
		<category><![CDATA[22 Ways To JBoss Performance Tuning]]></category>
		<category><![CDATA[Cache Invalidation Jboss]]></category>
		<category><![CDATA[Embedded Web Container]]></category>
		<category><![CDATA[F. Marchioni]]></category>
		<category><![CDATA[JBoss and log4j]]></category>
		<category><![CDATA[JBoss Cluster]]></category>
		<category><![CDATA[JBoss Distributed Garbage Collection]]></category>
		<category><![CDATA[JBoss Garbage Collector]]></category>
		<category><![CDATA[JBoss Heap]]></category>
		<category><![CDATA[JBoss Memory Monitor]]></category>
		<category><![CDATA[JBoss Parallel Garbage Collection]]></category>
		<category><![CDATA[JBoss Performance Tuning]]></category>
		<category><![CDATA[JBoss Prepared Statement Cache]]></category>
		<category><![CDATA[JBoss Services]]></category>
		<category><![CDATA[JBoss Thread Pool]]></category>
		<category><![CDATA[JBoss xms and xmx value]]></category>
		<category><![CDATA[Pool Invoker JBoss]]></category>
		<category><![CDATA[Read Only Entity Beans JBoss]]></category>
		<category><![CDATA[Ways to tune JBoss Performance]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=137</guid>
		<description><![CDATA[I found this great article written by F.Marchioni at his website. You can read detailed article at his website by clicking here. This is my all time favorite reference for tuning up my JBoss. I am just providing just a gist of what he is saying regarding the JBoss Performance Tuning. 1. Tune the garbage [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial &#8211; Encryption And Decryption Using DESede (Triple DES) In Java</title>
		<link>http://sanjaal.com/java/189/java-encryption/tutorial-encryption-and-decryption-using-desede-triple-des-in-java/</link>
		<comments>http://sanjaal.com/java/189/java-encryption/tutorial-encryption-and-decryption-using-desede-triple-des-in-java/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 00:25:43 +0000</pubDate>
		<dc:creator>Kushal Paudyal</dc:creator>
				<category><![CDATA[Java - Encryption]]></category>
		<category><![CDATA[Data Encryption Standard (DES)]]></category>
		<category><![CDATA[DESede In Java]]></category>
		<category><![CDATA[DESedeKeySpec]]></category>
		<category><![CDATA[Encryption Key]]></category>
		<category><![CDATA[Java Block Cyphers]]></category>
		<category><![CDATA[Java Cryptoanalysis]]></category>
		<category><![CDATA[Java Cryptography]]></category>
		<category><![CDATA[Java Cypher]]></category>
		<category><![CDATA[Java Decryption DESede]]></category>
		<category><![CDATA[Java Decryption Triple DES]]></category>
		<category><![CDATA[Java Encryption DESede]]></category>
		<category><![CDATA[Java Encryption Triple DES]]></category>
		<category><![CDATA[Java Symmetric Key Algorithm]]></category>
		<category><![CDATA[Java Tutorial Triple DES Decryption]]></category>
		<category><![CDATA[Java Tutorial Triple DES Encryption]]></category>
		<category><![CDATA[Secret Key Java]]></category>
		<category><![CDATA[SecretKeyFactory]]></category>
		<category><![CDATA[Triple DES Decryption In Java]]></category>
		<category><![CDATA[Triple DES Encryption In Java]]></category>
		<category><![CDATA[Triple DES Independent Keys]]></category>
		<category><![CDATA[Triple DES Keying Options]]></category>

		<guid isPermaLink="false">http://sanjaal.com/java/?p=189</guid>
		<description><![CDATA[We learned how to do a DES Encryption /Decryption in Java in the previous tutorial. In this tutorial, we will extend our knowledge of DES Encryption to DESede also known as Triple DES. Triple DES is the common name for the Triple Data Encryption Algorithm (TDEA) block cipher.It is so named because it applies the [...]]]></description>
			<content:encoded><![CDATA[<!--INFOLINKS_ON--><p><strong><span style="color: #008000;">How it began?</span></strong><br />
When I started a PHPBB Forum I defined BBCodes for Ads (Google Ads etc) in the board so that in any posts when I insert those BBCodes, corresponding Ads would be coming up.</p>
<p><strong><span style="color: #008000;">The Problem:</span></strong><br />
Then I started an imagehost service which would give me a bunch of codes for the images that I would upload. I would normally be posting one image per post followed by an Ad. But sometimes the number would be so huge, I would just like to turn of the javascripts (so that I dont generate false page impressions on the advertisements), and then manually write the BBCodes after the image host codes (because javascript is disabled, clicking on the BB Codes wouldn&#8217;t insert the code.)</p>
<p>To make it more clear, my image host codes would be something like:</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</span></pre>
<p>and I had to manually type the bbcodes on the next line following the URL (because I disabled javascripts for posting).</p>
<pre><span style="color: #008000;">[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]</span></pre>
<p>With a huge number of images, it is sometimes cumbersome to type in those BB Codes myself.</p>
<p>This java utility that I wrote basically reads a bunch of those URL Lines from a file, appends a random BBCode (I have three ads that I would like to show, chosen at random) after each line and then save it to back to the file. After that all I have to do is copy-paste the URL+BBcode and post it.</p>
<pre class="brush: java;">
/**
 * @Author Kushal Paudyal
 * www.sanjaal.com/java
 * Last Modified On: 23rd July 2009
 */
package com.kushal.utils;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class BBCodeAppender {

	static String[] bbCodes = { &quot;gad1&quot;, &quot;gad2&quot;, &quot;gad3&quot; };

	static String modifiedText = &quot;&quot;;

	public static void main(String args[]) {
		String fileName = &quot;C:/temp/bbcodeappendtest.txt&quot;;
		appendBBCodesOnLines(fileName);
	}

	public static void appendBBCodesOnLines(String fileName) {
		try {
			/**
			 * Read the file and append the BB Code
			 */
			BufferedReader in = new BufferedReader(new FileReader(fileName));
			String line;
			while ((line = in.readLine()) != null) {

				if (line.trim().length() &amp;gt; 0) //to avoid appending to the empty lines
				{
					line += &quot;\n&quot; + getRandomBBCode() + &quot;\n&quot;;
					modifiedText += line;
				}
			}
			in.close();

			/**
			 * Write the modified text back to the file.
			 */
			FileWriter fstream = new FileWriter(fileName);
			BufferedWriter out = new BufferedWriter(fstream);
			out.write(modifiedText);
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static String getRandomBBCode() {
		String bbCode = &quot;&quot;;
		int index = (int) (Math.random() * 100) % bbCodes.length;
		bbCode = &quot;[&quot; + bbCodes[index] + &quot;][/&quot; + bbCodes[index] + &quot;]&quot;;
		return bbCode;
	}
}</pre>
<p>==========</p>
<p><span style="color: #ff0000;"><strong>Input File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]</pre>
<p><span style="color: #ff0000;"><strong>Output File Content:</strong></span></p>
<pre>[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad1][/gad1]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad3][/gad3]
[url=http://sanjaal.com/ihost/share-EDC8.html][img]http://sanjaal.com/ihost/image-EDC8.jpg[/img][/url]
[gad2][/gad2]</pre>
</p>
<div id="apf_post_footer">
<h4>Related Java Blog Posts</h4>
<ul>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=224">How To Set And Get System Clipboard Contents In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=74">Reading / Writing File in Java and String Manipulation</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=540">How to capture a screenshot using Java and save it to a file?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=17">Generating Nepali Unicode Sequence For Characters</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=48">Calculating Folder Size In Java</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=5">Calculating Difference In Months For Two Dates</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=46">Calling URL Browser From Java Application</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=164">How To Find What Java Version You Are Using?</a></li>
<li class="apf_footer"><a href="http://sanjaal.com/java/?p=537">Replacing non-ASCII characters using Java Regular Expressions</a></li>
</ul>
</div>
<p><!-- Begin: AdBrite, Generated: 2010-08-23 14:45:58  --><br />
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script><br />
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1307984&#038;zs=3732385f3930&#038;ifr='+AdBrite_Iframe+'&#038;ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script><br />
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1307984&#038;afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span><br />
<!-- End: AdBrite --></p>
<p><font size="-2" color = "green"><br />
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing &#8211; our website does not ask for your credit card and banking information. Happy Surfing!<br />
</font></p>
<!--INFOLINKS_OFF--><p id="bte_opp"><small>Originally posted 2009-07-23 13:28:44. </small></p><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://sanjaal.com/java/wp-content/plugins/add-to-any/share_save_171_16.gif" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://sanjaal.com/java/217/java-general/bbcode-appender-on-line-of-text-java-utility-sample-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.818 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-03 00:04:51 -->
