This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm not sure what you are asking and how it's related to serialization (the title of your thread). .txt and .html files aren't the same - of course they have textual content but HTML has a specific syntax. What exactly are you trying to do?
sir actually i want to copy all text data from html file to txt file.
i do not understand how can i read the data of html file.
we normally save text data in .txt file using serialization.
so i think its a topic of serialization,if i am wrong you tell me how can i done it??
please help me
rahul arno wrote:we normally save text data in .txt file using serialization.
You do? Seems like a mighty odd way to do it to me.
If you literallly just want to copy the contents of the file blindly, then:
1. If you're on Java v6 or earlier, just open a FileInputStream and FileOutputStream to the relevant names and loop through the contents with read() and write(). There may even be slicker solutions available.
2. If you're on Java v7, use Files.copy().
But I suspect that Guillaume is right, and that you actually have something different in mind; but until you tell us what that is, it's difficult to advise.
Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here