Reading data from a file using BufferedReader

 

/* Java BufferedInputStream class is used to read information from stream.
It internally uses buffer mechanism to make the performance fast.

The important points about BufferedInputStream are:

When the bytes from the stream are skipped or read,
the internal buffer automatically refilled from the contained input stream,
many bytes at a time.
When a BufferedInputStream is created, an internal buffer array is created. */

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

class BufferedReaderDemo {

public static void main(String[] args)
throws FileNotFoundException, IOException {
FileReader fr = new FileReader("BufferedWriter.txt");
BufferedReader br = new BufferedReader(fr);
int data;
while ((data = br.read()) != -1) {
System.out.print((char) data);
}
System.out.println();
br.close();
}
}

Google Script for Data Entry Form in Google Spreadsheet

// function to validate the entry made by user in user form function validateEntry (){ // declare a variable and referernece of active goog...