clarisse Posted March 6, 2007 Posted March 6, 2007 I was wondering if there is an easy way to check if RAF exist like with sequential files with the .exists() method. I checked in the Java Sun website and apparently there isn't so the only thing that occured to me was to get the file pointer (getFilePointer()) and if it is null then the file doesn't exist. Any suggestions?
foodchain Posted March 6, 2007 Posted March 6, 2007 I was wondering if there is an easy way to check if RAF exist like with sequential files with the .exists() method. I checked in the Java Sun website and apparently there isn't so the only thing that occured to me was to get the file pointer (getFilePointer()) and if it is null then the file doesn't exist. Any suggestions? Here are two links that might help. http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Supplements/Chapter09/randomAccess.html http://java.sun.com/docs/books/tutorial/essential/io/rafs.html If anything there is always exceptions, I mean there are entire families of them for anything software based, because they are not exceptions, just more programming:D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now