/*
Dewansh Gautam 2015025
Mayank Kumar 2015055
*/
package lab5;
import java.io.*;
public class StreamClass extends FileWriter
{
public StreamClass(File file) throws IOException
{
super(new File("EncryptedSong.txt"));
Encrypt();
}
public void write(int c)
{
try
{
super.write(c);
} catch (IOException e)
{
e.printStackTrace();
}
}
public void write(char[] cbuf, int off, int len) throws IOException
{
super.write(cbuf, off, len);
}
public void write(String str, int off,int len) throws IOException
{
super.write(str, off, len);
}
public void Encrypt()
{
new Database();
File f1 = new File("EncryptedSong.txt");
try
{
FileWriter out = new FileWriter(f1);
String a = "Song,Movie Name,Artist,Year of Release,Genre,Size,Rating,Duration";
for(int i = 0; i