Fullpage Screenshot for Firefox and Chrome using Selenium WebDriver ?

public class TechLearn
 {
public WebDriver driver;
public Selenium selenium;
public void Screenshot() throws Exception
{
DateFormat dateFormat = new SimpleDateFormat("yyyy_MMM_dd HH_mm_ss");
Date date = new Date();
String time=dateFormat.format(date);
System.out.println(time);
File f = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(
f, new File("/home/chinna/Desktop/TechLearn"+time+".png"));// Linux machinepath
//
FileUtils.copyFile(f, new File("F:\\Workspace\\ seleniumsubbu "+time+".png")); // for windowsmatchine path
}
@Test // Print Full Screenshot
public void PrintScreenShot() throws Exception{
driver.get("
http://seleniumsubbu.blogspot.in/");
Screenshot();

}