Java 38
QR : Quick Response Code
QR :Quick Response code. “Neo Reader” is used for processing these QR code. Used library:- https://github.com/kenglxn/QRGen/blob/master/dist/qrgen-1.0.jar http://code.google.com/p/zxing Project Structure:- QRCode Servlet:- package com.sandeep.qr.demo;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.OutputStream;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import net.glxn.qrgen.image.ImageType;import net.glxn.qrgen.QRCode; /** * Servlet implementation class QRResponseDemoServlet */public class QRResponseDemoServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** […]
Jaxb parsing : xml
JAXB is for converting java pojo to xml. It Supports annotation too. In jdk 1.6 and above it is aready package inside. For less then jdk 1.6 , download from link:- jaxb download link Project Structure :- Fruit Java Pojo:- package com.sandeep.jaxb.demo;import javax.xml.bind.annotation.XmlAttribute;import […]
XStream Parser : XML & JSON
Xstream parser is used to convert java POJO to xml or json and vice-versa. The main benefit is we can use different parsers for different file like Stax parser. download jar:- link to download xstream parser Project Structure :- Student Pojo Class :- package com.sandeep.example.value.objects;public class […]
Pretty Time Format :Java
Pretty time format is used mainly in social media site like twitter, Facebook. If you mark your posts in Facebook then you can see message like “posted 2mins ago”, “posted 1day ago”. These formats are pretty time format. Download the jar file from:- http://repo1.maven.org/maven2/com/ocpsoft/ocpsoft-pretty-time/1.0.7/ocpsoft-pretty-time-1.0.7.jar Project Structure:- Test the Pretty Time:- package com.sandeep.pretty.demo;import java.util.Calendar;import […]