Reading data from console and writing data on console using FileInputStream and FileOutputStream

 

/*If you have to write primitive values into a file,
use FileOutputStream class. You can write byte-oriented as well as character-oriented
data through FileOutputStream class. But, for character-oriented data,
it is preferred to use FileWriter than FileOutputStream.*/

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

class FileCopy1 {

public static void main(String[] args)
throws FileNotFoundException, IOException {
FileInputStream fis = new FileInputStream(args[0]);
FileOutputStream fos = new FileOutputStream(args[1]);

int data;
while ((data = fis.read()) != -1) {
fos.write(data);
}
System.out.println("File Copied");
fis.close();
fos.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...