- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLGenerator.java
More file actions
Latest commit
32 lines (29 loc) · 1 KB
/
Copy pathHTMLGenerator.java
File metadata and controls
32 lines (29 loc) · 1 KB
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
importjava.io.File;
importjava.io.PrintWriter;
importjava.util.Scanner;
publicclassHTMLGenerator {
publicstaticvoidmain(String[] args) {
// Arquivo de entrada e saída
StringinputFile = "input.txt", outputFile = "output.html";
FilefileHTML = newFile(outputFile), fileInput = newFile(inputFile);
try {
Scanners = newScanner(fileInput);
PrintWriterpw = newPrintWriter(fileHTML);
TAGControllertc = newTAGController(pw);
tc.init();
while(s.hasNextLine()){
String[] dados = s.nextLine().split(" ");
for(Stringdado : dados){
if(tc.defineTAG(dado)){
tc.abreTAG();
continue;
}
tc.insereDado(dado);
}
tc.fechaTAG();
}
tc.close();
} catch (Exceptione) {
}
}
}