Workshop: Writing Bytes to an MP3 File

This hour's workshop uses Java's file-handling and property configuration capabilities to clean up web pages. The TagCleaner application transforms all HTML markup tags on pages to upper- or lowercase, making these formatting commands more readable.

Listing 20.3 contains an example web page, test.html, with markup tags capitalized in several different ways.

Listing 20.3. The Full Text of test.html
 1: <HTML>
 2: <Head>
 3: <TITLE>PALINDROME</TITLE>
 4: </head>
 5: <Body BGCOLOR="#FFFFFF">
 6: <div ALIGN="Center">
 7: <P>Dennis and Edna sinned.</P>
 8: </div>
 9: </Body>
10: </HTML>

The HTML markup tags in Listing 20.3 are enclosed within “<” and “>” characters. These tags are not displayed when the page displays ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.