Creating a zip file using AntBuilder. def ant = new AntBuilder() ant.zip( destfile: destPath, basedir: basePath, includes: includeFiles, // Comma seperated file names excludes: excludeFiles, // Comma seperated file names level: 9 ...
Firstly ,you need to connect with facebook. Once you have facebook access token you can post messages on the facebook wall using the below code. void postMessage(String facebookAccessToken, String message, String facebookId) { StringBuilder stringBuilder = new StringBuilder("access_token="); ...
These are few basic steps which will help you to integrate your java application with facebook using facebook graph api. Steps : 1) Register your application at http://www.facebook.com/developers/ 2) Facebook will return Consumer Key and Consumer Secret for your application. 3) Create a login action: String...
This blog might help you to speed up your bootstrap process, especially when you need to populate records in tables. Earlier we used populate our database table by reading line by line from a CSV file and creating Domain Class object ad Save. But this was taking a huge time. And in our case, this data (more like a static information) was...
In one of our projects, we need to compare images which comes from various sources and remove the duplicate one. The below algo helps us to remove the duplicate images. boolean compareImage(String firstPhotoUrl, String secondPhotoUrl) { boolean result = true; BufferedImage bi1 = ImageIO.read(new...
These are few basic steps which will help you to integrate your java application with twitter using twitter4j. Twitter4J is a Java library for the Twitter API. With Twitter4J, you can easily integrate your Java application with the Twitter. Steps : 1) Register your application at http://twitter.com/apps 2) Twitter will return...
XStream is a simple Java library to serialize objects to XML and back again. Suppose we have a Person class as follows: public class Person { private String name private int age private Address address } public class Address { private String street private String city private String state private String...