1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 23:55:26 +02:00

[208778] [efs][api] Improve default impl of new getOutputStream() API for backward compatibility

This commit is contained in:
Martin Oberhuber 2007-12-06 11:18:34 +00:00
parent 47d69ab7aa
commit 2049848c1a

View file

@ -202,14 +202,26 @@ public abstract class AbstractFileService implements IFileService
}
/**
* The default implementation returns <code>null</code>. Clients can override to return an output stream to the file.
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, IProgressMonitor)
* Gets the output stream to write/append to a remote file.
* The default implementation returns <code>null</code>.
* Clients can override to return an output stream to the file.
* @deprecated
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
return null;
}
/**
* Gets the output stream to write/append to a remote file.
* The default implementation returns <code>null</code>.
* Clients can override to return an output stream to the file.
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, int, IProgressMonitor)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
if ((options & IFileService.APPEND) == 0) {
//forward to old deprecated implementation for backward compatibility with old services
return getOutputStream(remoteParent, remoteFile, isBinary, monitor);
}
return null;
}