Ketan KC Chachad

Greenhorn
+ Follow
since Oct 22, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ketan KC Chachad

Hi,

We are writing a Java class that reads emails from a mail box and saves the attachments to email on the physical drive. Along with saving the attachments, we need to save the email to the physical drive too but without the attachments. We are to use POP3 for retrieving the emails. We tried calling the removeBodyPart() method of the Multipart class. Although the method returns a true value when passed the index of the part to be removed or even if reference of the part is passed, when we save the Message object, it still has the attachments in it.

We tried calling the setContent() method of the Message class and passed it the Multipart object on which the removeBodyPart() method has been called. But that gives "javax.mail.IllegalWriteException: POP3 messages are read-only" message. Can anyone let me know what can be done for this?
16 years ago
Hi,
I just wanted to know if there is any way we can assure that a particular method will be invoked just before the object is destroyed by the garbage collector. I tried using a finalize() method but don't know if such a method exists. Actually there was this problem statement given by one of my teachers where we had to print the statements "Begin\nStart\nEnd" on the console but the main() method should just have the statement. We can enforce printing "Begin" by putting the print() statement in the constructor of the class, but I am confused as to how to make "End" print only and only when the object is destroyed / removed from memory. Please do help me in this regard.
18 years ago