|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.io.vfs.AbstractVfsFile
com.partnersoft.io.vfs.NonexistentVfsFile
public class NonexistentVfsFile
A VfsFile handle for a file that does not exist in a read-only VFS.
Copyright 2009 Partner Software, Inc.
| Constructor Summary | |
|---|---|
NonexistentVfsFile(Vfs vfs,
Path path)
|
|
| Method Summary | |
|---|---|
java.io.OutputStream |
createAppendingOutputStream()
Creates an output stream to append to the file. |
java.io.InputStream |
createInputStream()
Creates an input stream to read from the file. |
java.io.OutputStream |
createOutputStream()
Creates an output stream to write to the file. |
VfsRandomAccess |
createRandomAccess()
Creates a random access handle for the file. |
boolean |
exists()
Whether the Vfs node exists. |
long |
getLastModifiedMillis()
Returns the timestamp in milliseconds that the file was last modified. |
java.net.URI |
getUri()
URI for this VfsNode. |
java.net.URL |
getUrl()
URL for this VfsNode. |
void |
make()
Creates the node and any ancestor directories needed to contain it. |
void |
remove()
Removes the file. |
void |
setLastModifiedMillis(long millis)
If possible, sets the date and time the file was last modified in milliseconds. |
long |
size()
|
java.io.File |
toFile()
java.io.File for this VfsNode. |
| Methods inherited from class com.partnersoft.io.vfs.AbstractVfsFile |
|---|
appendBytes, appendText, checksum, copyTo, copyTo, createAppendingBufferedOutputStream, createAppendingBufferedWriter, createAppendingWriter, createBufferedInputStream, createBufferedOutputStream, createBufferedReader, createBufferedWriter, createReader, createWriter, equals, getAbsolutePath, getBaseName, getDirectory, getExtension, getLastModified, getName, getPath, getVfs, isBackup, isHidden, moveTo, moveTo, readBytes, readText, readTextAsLines, readTextRange, regexReplace, regexReplace, renameTo, setLastModified, textReplace, textReplace, toString, withExtension, writeBytes, writeText |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NonexistentVfsFile(Vfs vfs,
Path path)
| Method Detail |
|---|
public java.io.OutputStream createAppendingOutputStream()
throws java.io.IOException
VfsFileOutputStream.close()).
Note that this stream is NOT buffered. This is usually a bad thing,
unless you are doing your own buffering or doing a bulk write. So, don't
use this method unless you know what you're doing - use
VfsFile.createAppendingBufferedOutputStream() instead.
createAppendingOutputStream in interface VfsFilecreateAppendingOutputStream in class AbstractVfsFilejava.io.IOException
public java.io.InputStream createInputStream()
throws java.io.IOException
VfsFileInputStream.close() when you are done with it. Note that
this stream is NOT buffered. This is usually a bad thing, unless you are
doing your own buffering or doing a single bulk read. So, don't use this
method unless you know what you're doing - use
VfsFile.createBufferedInputStream() instead.
createInputStream in interface VfsFilecreateInputStream in class AbstractVfsFilejava.io.IOException - if the read fails
public java.io.OutputStream createOutputStream()
throws java.io.IOException
VfsFileOutputStream.close()).
Note that this stream is NOT buffered. This is usually a bad thing,
unless you are doing your own buffering or doing a bulk write. So, don't
use this method unless you know what you're doing - use
VfsFile.createBufferedOutputStream() instead.
createOutputStream in interface VfsFilecreateOutputStream in class AbstractVfsFilejava.io.IOException
public VfsRandomAccess createRandomAccess()
throws java.io.IOException
VfsFile
createRandomAccess in interface VfsFilecreateRandomAccess in class AbstractVfsFilejava.io.IOException - if file can't be accessed
public boolean exists()
throws java.io.IOException
VfsNodeVfsNode.make() to create the node if it does not exist.
exists in interface VfsNodeexists in class AbstractVfsFilejava.io.IOException - if it can't tell for some reason.
public long getLastModifiedMillis()
throws java.io.IOException
VfsFilegetLastModified().getMillis().
getLastModifiedMillis in interface VfsFilegetLastModifiedMillis in class AbstractVfsFilejava.io.IOException
public void make()
throws java.io.IOException
VfsNode
make in interface VfsNodemake in class AbstractVfsFilejava.io.IOException - if it can't.
public void setLastModifiedMillis(long millis)
throws java.io.IOException
VfsFilesetLastModified(new DateAndTime(millis)).
setLastModifiedMillis in interface VfsFilesetLastModifiedMillis in class AbstractVfsFilejava.io.IOException
public long size()
throws java.io.IOException
size in interface VfsFilesize in class AbstractVfsFilejava.io.IOException
public void remove()
throws java.io.IOException
VfsFile
java.io.IOExceptionpublic java.net.URI getUri()
VfsNode
public java.net.URL getUrl()
VfsNode
public java.io.File toFile()
VfsNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||