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.
The moose likes Groovy and the fly likes How do I close a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Languages » Groovy
Bookmark "How do I close a file" Watch "How do I close a file" New topic
Author

How do I close a file

Eric Palmer
Greenhorn

Joined: Dec 15, 2010
Posts: 1
How do I close a file after writing to it. file.close() is not in the jdk



Thanks so much!

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302
    
    6

Groovy handles the close for you. So no need to explicitly call it.


GenRocket - Experts at Building Test Data
kritika das
Greenhorn

Joined: Jun 17, 2011
Posts: 10
Eric Palmer wrote: How do I close a file after writing to it. file.close() is not in the jdk



Thanks so much!




Yes, Gregg Bolinger is absolutely right. Groovy is responsible for all activity of file and handle it.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How do I close a file
 
jQuery in Action, 3rd edition