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.
Is there way to open a file without save it in file system? For example: I have a byte object or java.io.File (or Stream) and i want to open a file without save it.
Can i use Runtime.getRuntime().exec(....) to open a file not in file system?
Team Leader<br />SCJP, SCBCD , SCDJWS, Oracle WebLogic, IBM WebSphere e IBM FileNet Certified<br /> <br /><a href="http://www.marcolombardo.it" target="_blank" rel="nofollow">http://www.marcolombardo.it</a>
What do you mean by "open a file without saving it?". A file cannot be opened unless it exists on disk.
Perhaps you are thinking of the way you can open a new document in, say, Microsoft Word, without saving it. That's something completely different. You could implement such a user interface in Java, but that has little to do with Java File objects.
You can create a Java File object for a file that does not exist. A Java File object is just an abstract pathname. However, creating a Java File object does not mean you have "opened" the file. To open the file, you need a RandomAccessFile, an InputStream, an OutputStream or an NIO channel (I'm a bit hazy on them). For any of those, the file must already exist or will be created as part of the opening process. [ July 17, 2006: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.