-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInToDataBase.java
More file actions
33 lines (32 loc) · 1010 Bytes
/
InToDataBase.java
File metadata and controls
33 lines (32 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.io.*;
/**
* Write a description of class InToDataBase here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class InToDataBase
{
// instance variables - replace the example below with your own
private String fileName;// name of database where there the information is store
private Log masterlog;// information that should be store
/**
* Constructor for objects of class InToDataBase which send information to the database
*/
public InToDataBase(String fileName,Log masterlog)
{
PrintWriter outFile =null;
String file =fileName;
try
{
FileWriter fw = new FileWriter(file,true);
outFile= new PrintWriter(fw);
}
catch(Exception e)
{
System.out.println("oops an errors have occur with Master Log.");
}
outFile.println(masterlog.toString());
outFile.close();
}
}