Java2HTML Reconstruction Reconstruction (5)

zhaozj2021-02-17  73

Java2HTML Reconstruction Reconstruction (5)

The next is our weight. Let this parameter work.

The last call in the java2html.java main method

Java2html.buildjava2html ();

Then let's continue from here.

Public Boolean Buildjava2HTML ()

Throws Exception

{

O01049 ();

O01050 o01050 = new o01050 (o01044);

IF (o01043 == null)

{

SetjavadirectorySource (new string "{

"."

});

}

O01052 o01052 = new O01052 (O01043, O01045, O01040, O01041, O01012, O01014, O01050);

IF (! o01042)

{

O01052.O01054 (O01045, O01052, O01002);

}

O01052.O01055 ();

Return True;

}

Let's take a look at O01049 ():

PRIVATE VOID O01049 ()

Throws oException

{

(New file (o01045)). MKDIRS ();

File File = NULL;

FileWriter FileWriter = NULL;

File = new file (o01045 file.separator "stylesheet.css");

FileWriter = New FileWriter (File);

FileWriter.write (O07.O0998 ());

FileWriter.Close ();

System.out.println ("created" file.getabsolutePath ());

IF (! o01042)

{

File file1 = new file (o01045 file.separator "front.html");

FileWriter FileWriter1 = New FileWriter (file1);

FileWriter1.write (O07.O0999 ());

Filewriter1.close ();

System.out.println ("create" file1.getabsolutepath ());

File1 = new file (o01045 file.separator "index.html");

FileWriter1 = New FileWriter (file1);

FileWriter1.write (O07.O01001 (O01002));

Filewriter1.close ();

}

}

It turns out that a few basic pages and style sheets are generated here. The required resources are read from the O07, it seems that this file is focusing. However, this method should also be modified, when the HTML file should be output Since the resources specified by the user, since the resource is from O07, then add an encoding property to the O07.

//O07.java

STATIC STRING S2;

Public static void setEncoding (String str) {

S2 = STR;

}

//java2html.java

PRIVATE VOID O01049 ()

Throws oException

{

(New file (o01045)). MKDIRS ();

File File = NULL;

FileWriter FileWriter = NULL;

File = new file (o01045 file.separator "stylesheet.css"); FileWriter = New FileWriter (file);

// MODIFY

FileWriter.write (New String (o07.O0998 (). getBytes (Encoding)));

FileWriter.Close ();

System.out.println ("created" file.getabsolutePath ());

IF (! o01042)

{

// Write the Front.html file, the resource is read from O07. The original O07 is a resource file

// So we also add an encoding property to O07.

O07.setencoding (encoding);

File file1 = new file (o01045 file.separator "front.html");

FileWriter FileWriter1 = New FileWriter (file1);

// Code processing

FileWriter1.write (new string (o07.O0999 (). getBytes (Encoding)));

Filewriter1.close ();

System.out.println ("create" file1.getabsolutepath ());

File1 = new file (o01045 file.separator "index.html");

FileWriter1 = New FileWriter (file1);

// Code processing

FileWriter1.write (NEW STRING ((O07.O01001 (O01002)). GetBytes (Encoding)));

Filewriter1.close ();

}

}

Let's go back to the Buildjava2HTML method, see:

O01052 o01052 = new O01052 (O01043, O01045, O01040, O01041, O01012, O01014, O01050);

The original user parameters are transferred here, then we will send our parameters.

O01052 O01052 = New O01052 (O01043, O01045, O01040, O01041, O01012, O01014, O01050, ENCODING)

Then add in O01052:

PRIVATE STATIC STRING ENCODING

And modify its constructor:

Public O01052 (String As [], String S, Int i, Int J, Boolean flag, Boolean flag1, o01050 o01050, STRING S1)

{

O0106 = new o040 (system.in);

For (int K = 0; k

{

O01097 (AS [K]);

}

O01045 = S;

O01040 = i;

O01041 = j;

O01012 = FLAG;

O01014 = FLAG1;

O01051 = O01050;

Encoding = S1;

}

I want to know how the matter is, and I listen to the decomposition.

转载请注明原文地址:https://www.9cbs.com/read-31158.html

New Post(0)