Barcode generation using Java and iText

This is the one way to create iText reporting pdf with barcode ===================================================== package module.bKash; import java.awt.Color; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.Format; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import Read More …

JSON data receive from API like bKash (Banglades) using Java

download JSON jar file org.json-20120521.jar then write the following code String user=””,pass=””,msisdn=””; connectionstring=”http://www.bkashcluster.com:7080/……… /sendmsg”; user=r.getString(“USERNAME”); pass=r.getString(“PASSWORD”); msisdn=r.getString(“MOBILE”); connectionstring=r.getString(“CONNECTIONSTRING”); JSONObject tmpResponse1 = getFromBKash(user, pass, msisdn, trxid, connectionstring); ——————————————————————— private JSONObject getFromBKash(String user, String pass,String msisdn,String trxid,String connectionstring) { StringBuilder sb = Read More …

iText Reporting using Java, Struts

iText is very easy reporting tool for pdf generation using Java. this is the sample code for for generating pdf usnig iText and Java ———————————————————————— package module.bKash; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.Format; import Read More …

Writing and Parsing Json with Java

Here is a simple example of Writing and parsing Json with Java. I have used simple json library for the purpose. Get the library in this link http://code.google.com/p/json-simple/downloads/detail?name=json_simple.jar&can=2&q=   /** Author joydeb Kumar Sana */ package com.demo.util; import java.text.ParseException; import Read More …

Writing and Parsing Json with Java

Here is a simple example of Writing and parsing Json with Java. I have used simple json library for the purpose. Get the library in this link http://code.google.com/p/json-simple/downloads/detail?name=json_simple.jar&can=2&q= package com.demo.util; import java.text.ParseException; import java.util.Iterator; import org.json.simple.*; import org.json.simple.parser.JSONParser; public class Read More …