Appends the entire contents of the given stream to this file.
This is a convenience method, fully equivalent to:
appendContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
This method changes resources; these changes will be reported in a subsequent resource change event, including an indication that this file's content have been changed.
This method is long-running; progress and cancelation are provided by the given progress monitor.
@param source an input stream containing the new contents of the file
@param force a flag controlling how to deal with resources thatare not in sync with the local file system
@param keepHistory a flag indicating whether or not to storethe current contents in the local history
@param monitor a progress monitor, or
null
if progressreporting is not desired
@exception CoreException if this method fails. Reasons include:
- This resource does not exist.
- The corresponding location in the local file system is occupied by a directory.
- The workspace is not in sync with the corresponding location in the local file system and
force
is false
. - Resource changes are disallowed during certain types of resource change event notification. See
IResourceChangeEvent
for more details. - The file modification validator disallowed the change.
@exception OperationCanceledException if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
@see #appendContents(java.io.InputStream,int,IProgressMonitor)