|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.core.runtime.PlatformObject de.matthias_burbach.mosaique4eclipse.util.FileStorage
Wraps a file as an IStorage
.
Constructor Summary | |
FileStorage(org.eclipse.core.runtime.IPath path)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
Two FileStorages are equal if their IPaths are equal. |
java.io.InputStream |
getContents()
|
org.eclipse.core.runtime.IPath |
getFullPath()
|
java.lang.String |
getName()
|
int |
hashCode()
|
boolean |
isReadOnly()
|
void |
setContents(java.io.InputStream stream,
boolean overwrite,
org.eclipse.core.runtime.IProgressMonitor monitor)
Writes the contents of the given input stream to the encapsulated file. |
void |
setReadOnly()
Some document providers (notably CompilationUnitDocumentProvider) can't handle read/write storage. |
java.lang.String |
toString()
The OS specific representation of the file's path. |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
getAdapter |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
Constructor Detail |
public FileStorage(org.eclipse.core.runtime.IPath path)
path
- The path of the file to encapsulate.
Must not be null
.Method Detail |
public java.io.InputStream getContents() throws org.eclipse.core.runtime.CoreException
getContents
in interface org.eclipse.core.resources.IStorage
org.eclipse.core.runtime.CoreException
public org.eclipse.core.runtime.IPath getFullPath()
getFullPath
in interface org.eclipse.core.resources.IStorage
public java.lang.String getName()
getName
in interface org.eclipse.core.resources.IStorage
public boolean isReadOnly()
isReadOnly
in interface org.eclipse.core.resources.IStorage
public void setContents(java.io.InputStream stream, boolean overwrite, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
stream
- The input stream to write to the file.overwrite
- Whether to overwrite the existing file or not.
Is ignored.monitor
- The progress monitor to feed with progress on writing the
input stream to the file. Is ignored.
org.eclipse.core.runtime.CoreException
- if anything goes wrongpublic void setReadOnly()
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |