From 6136db19882a2531a140565a8bb909aede9988fd Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Mon, 7 Jan 2008 14:58:38 +0000
Subject: [PATCH] [208778][api] Change new Streams Services API to use int
options instead of boolean binary
---
releng/org.eclipse.rse.build/maps/rse.map | 16 ++++-----
.../rse/internal/efs/RSEFileStoreImpl.java | 2 +-
.../dstore/files/DStoreFileService.java | 20 +++--------
.../services/files/ftp/FTPService.java | 25 +++----------
.../local/files/LocalFileService.java | 15 ++------
.../services/ssh/files/SftpFileService.java | 35 +++----------------
.../services/files/AbstractFileService.java | 5 +--
.../rse/services/files/IFileService.java | 21 +++++++----
.../FileServiceSubSystem.java | 4 +--
.../core/subsystems/IRemoteFileSubSystem.java | 8 ++---
10 files changed, 47 insertions(+), 104 deletions(-)
diff --git a/releng/org.eclipse.rse.build/maps/rse.map b/releng/org.eclipse.rse.build/maps/rse.map
index 7886b6ad65b..3f6aa69e5d9 100644
--- a/releng/org.eclipse.rse.build/maps/rse.map
+++ b/releng/org.eclipse.rse.build/maps/rse.map
@@ -1,12 +1,12 @@
feature@org.eclipse.rse=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse-feature
feature@org.eclipse.rse.core=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.core-feature
-feature@org.eclipse.rse.dstore=v20080102,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
+feature@org.eclipse.rse.dstore=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.dstore-feature
feature@org.eclipse.rse.examples=v20071121,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.examples-feature
feature@org.eclipse.rse.ftp=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ftp-feature
-feature@org.eclipse.rse.local=v20080104,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
+feature@org.eclipse.rse.local=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.local-feature
feature@org.eclipse.rse.remotecdt=v20071031,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.remotecdt-feature
feature@org.eclipse.rse.sdk=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature
-feature@org.eclipse.rse.ssh=v20071206,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
+feature@org.eclipse.rse.ssh=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.ssh-feature
feature@org.eclipse.rse.telnet=v20071121,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/features/org.eclipse.rse.telnet-feature
feature@org.eclipse.rse.tests=v20071206,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/tests/org.eclipse.rse.tests-feature
plugin@org.eclipse.dstore.core=v20080102,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.dstore.core
@@ -30,12 +30,12 @@ plugin@org.eclipse.rse.importexport=v20071106,:pserver:anonymous:none@dev.eclips
plugin@org.eclipse.rse.processes.ui=v20071031,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.processes.ui
plugin@org.eclipse.rse.remotecdt=v20071031,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/examples/org.eclipse.rse.remotecdt
plugin@org.eclipse.rse.sdk=v20071031,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.sdk
-plugin@org.eclipse.rse.services.dstore=v20080102,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
-plugin@org.eclipse.rse.services.files.ftp=v20071206,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
-plugin@org.eclipse.rse.services.local=v20080104,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
-plugin@org.eclipse.rse.services.ssh=v20071206,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
+plugin@org.eclipse.rse.services.dstore=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.dstore
+plugin@org.eclipse.rse.services.files.ftp=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.files.ftp
+plugin@org.eclipse.rse.services.local=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.local
+plugin@org.eclipse.rse.services.ssh=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh
plugin@org.eclipse.rse.services.telnet=v20071106,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services.telnet
-plugin@org.eclipse.rse.services=v20080102,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
+plugin@org.eclipse.rse.services=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.services
plugin@org.eclipse.rse.shells.ui=v20080102,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui
plugin@org.eclipse.rse.subsystems.files.core=v20080107,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.core
plugin@org.eclipse.rse.subsystems.files.dstore=v20071106,:pserver:anonymous:none@dev.eclipse.org:/cvsroot/dsdp,,org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.files.dstore
diff --git a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
index f9019734474..66c01d986c8 100644
--- a/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
+++ b/rse/plugins/org.eclipse.rse.efs/src/org/eclipse/rse/internal/efs/RSEFileStoreImpl.java
@@ -678,7 +678,7 @@ public class RSEFileStoreImpl extends FileStore
} else {
options = IFileService.NONE;
}
- return subSys.getOutputStream(remoteFile.getParentPath(), remoteFile.getName(), true, options, monitor);
+ return subSys.getOutputStream(remoteFile.getParentPath(), remoteFile.getName(), options, monitor);
}
catch (SystemMessageException e) {
throw new CoreException(new Status(IStatus.ERROR,
diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
index 3181dab3265..431dfb843a3 100644
--- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
+++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java
@@ -2033,28 +2033,16 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
* @see org.eclipse.rse.services.files.IFileService#getOutputStream(org.eclipse.core.runtime.IProgressMonitor, java.lang.String, java.lang.String, boolean)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
- int mode;
-
- if (isBinary)
- {
- mode = IUniversalDataStoreConstants.BINARY_MODE;
- }
- else
- {
- mode = IUniversalDataStoreConstants.TEXT_MODE;
- }
-
- DStoreOutputStream outputStream = new DStoreOutputStream(getDataStore(), remotePath, getEncoding(monitor), mode, unixStyle, IFileService.NONE);
- return outputStream;
+ int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
+ return getOutputStream(remoteParent, remoteFile, options, monitor);
}
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
String remotePath = remoteParent + getSeparator(remoteParent) + remoteFile;
int mode;
- if (isBinary)
+ if ((options & IFileService.TEXT_MODE) == 0)
{
mode = IUniversalDataStoreConstants.BINARY_MODE;
}
diff --git a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
index f0a8d1cb5b1..481afc0deea 100644
--- a/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
+++ b/rse/plugins/org.eclipse.rse.services.files.ftp/src/org/eclipse/rse/internal/services/files/ftp/FTPService.java
@@ -1627,33 +1627,15 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- remoteParent = checkEncoding(remoteParent);
- remoteFile = checkEncoding(remoteFile);
-
- if (monitor != null && monitor.isCanceled()){
- throw new RemoteFileCancelledException();
- }
-
- OutputStream stream = null;
-
- try {
- FTPClient ftpClient = cloneFTPClient(isBinary);
- clearCache(remoteParent);
- ftpClient.changeWorkingDirectory(remoteParent);
- stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient);
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return stream;
+ int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
+ return getOutputStream(remoteParent, remoteFile, options, monitor);
}
/*
* (non-Javadoc)
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
remoteParent = checkEncoding(remoteParent);
remoteFile = checkEncoding(remoteFile);
@@ -1664,6 +1646,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
OutputStream stream = null;
try {
+ boolean isBinary = (options & IFileService.TEXT_MODE) == 0 ? true : false;
FTPClient ftpClient = cloneFTPClient(isBinary);
clearCache(remoteParent);
ftpClient.changeWorkingDirectory(remoteParent);
diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
index 3915bf5f9fb..46763bde83c 100644
--- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
+++ b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java
@@ -1641,24 +1641,15 @@ public class LocalFileService extends AbstractFileService implements IFileServic
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(String, String, boolean, IProgressMonitor)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- File file = new File(remoteParent, remoteFile);
- OutputStream stream = null;
-
- try {
- stream = new FileOutputStream(file);
- }
- catch (Exception e) {
- throw new RemoteFileIOException(e);
- }
-
- return stream;
+ int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
+ return getOutputStream(remoteParent, remoteFile, options, monitor);
}
/*
* (non-Javadoc)
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
File file = new File(remoteParent, remoteFile);
OutputStream stream = null;
diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
index 0b32dde4f37..c1ebca79395 100644
--- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
+++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java
@@ -1031,8 +1031,7 @@ public class SftpFileService extends AbstractFileService implements IFileService
if (permNew != permOld) {
//getChannel("SftpFileService.setReadOnly").chmod(permNew, path); //$NON-NLS-1$
attr.setPERMISSIONS(permNew);
- getChannel("SftpFileService.setReadOnly").setStat(recode(path), attr); //$NON-NLS-1$
- ok=true;
+ getChannel("SftpFileService.setReadOnly").setStat(recode(path), attr); //$NON-NLS-1$ ok=true;
Activator.trace("SftpFileService.setReadOnly ok"); //$NON-NLS-1$
} else {
ok=true;
@@ -1080,41 +1079,15 @@ public class SftpFileService extends AbstractFileService implements IFileService
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(String, String, boolean, IProgressMonitor)
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
-
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
-
- OutputStream stream = null;
- String dst = remoteParent;
- if (remoteFile!=null) {
- dst = concat(remoteParent, remoteFile);
- }
-
- try {
- SftpProgressMonitor sftpMonitor = new MyProgressMonitor(monitor);
- int mode = ChannelSftp.OVERWRITE;
- getChannel("SftpFileService.getOutputStream " + remoteFile); //check the session is healthy //$NON-NLS-1$
- ChannelSftp channel = (ChannelSftp)fSessionProvider.getSession().openChannel("sftp"); //$NON-NLS-1$
- channel.connect();
- stream = new SftpBufferedOutputStream(channel.put(recodeSafe(dst), sftpMonitor, mode), channel);
- Activator.trace("SftpFileService.getOutputStream " + remoteFile + " ok"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (Exception e) {
- Activator.trace("SftpFileService.getOutputStream " + dst + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
- throw makeSystemMessageException(e);
- }
- if (monitor.isCanceled()) {
- throw new RemoteFileCancelledException();
- }
- return stream;
+ int options = isBinary ? IFileService.NONE : IFileService.TEXT_MODE;
+ return getOutputStream(remoteParent, remoteFile, options, monitor);
}
/*
* (non-Javadoc)
* @see org.eclipse.rse.services.files.AbstractFileService#getOutputStream(java.lang.String, java.lang.String, boolean, int, org.eclipse.core.runtime.IProgressMonitor)
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
if (monitor == null) {
monitor = new NullProgressMonitor();
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
index f5187f6f389..45addc8565f 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/AbstractFileService.java
@@ -215,11 +215,12 @@ public abstract class AbstractFileService implements IFileService
* Gets the output stream to write/append to a remote file.
* The default implementation returns null
.
* Clients can override to return an output stream to the file.
- * @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, boolean, int, IProgressMonitor)
+ * @see org.eclipse.rse.services.files.IFileService#getOutputStream(String, String, int, IProgressMonitor)
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
if ((options & IFileService.APPEND) == 0) {
//forward to old deprecated implementation for backward compatibility with old services
+ boolean isBinary = (options & IFileService.TEXT_MODE) == 0 ? true : false;
return getOutputStream(remoteParent, remoteFile, isBinary, monitor);
}
return null;
diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
index 30fdfc3685f..a1df5e738f3 100644
--- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
+++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/files/IFileService.java
@@ -104,10 +104,21 @@ public interface IFileService extends IService
* Options constant (value 1 <<0) for specifying a stream
* that will append data to a file.
*
- * @see IFileService#getOutputStream(String, String, boolean, int, IProgressMonitor)
+ * @see IFileService#getOutputStream(String, String, int, IProgressMonitor)
*/
public static final int APPEND = 1 << 0;
+ /**
+ * Options constant (value 2 <<0) for specifying that a file
+ * is Text instead of the default Binary.
+ *
+ * In Text mode, encoding conversions and line end conversions can be
+ * performed on the stream.
+ *
+ * @see IFileService#getOutputStream(String, String, int, IProgressMonitor)
+ */
+ public static final int TEXT_MODE = 2 << 0;
+
/**
* Options constant (value 0) to indicate that no bit options are set.
*/
@@ -469,8 +480,7 @@ public interface IFileService extends IService
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since 2.0
- * @deprecated As of 3.0M4, replaced by
- * {@link #getOutputStream(String, String, boolean, int, IProgressMonitor)}
+ * @deprecated Use {@link #getOutputStream(String, String, int, IProgressMonitor)} instead
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
@@ -478,14 +488,13 @@ public interface IFileService extends IService
* Gets the output stream to write/append to a remote file. Clients should close the output stream when done.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
- * @param isBinary true
if the file is a binary file, false
otherwise.
- * @param options bit wise or of option constants. Valid constants are {@link IFileService#APPEND} and {@link IFileService#NONE}
+ * @param options bit wise or of option constants. Valid constants are {@link IFileService#APPEND}, {@link IFileService#TEXT_MODE}, and {@link IFileService#NONE}
* @param monitor the progress monitor.
* @return the input stream to access the contents of the remote file.
* @throws SystemMessageException if an error occurs.
* @since 3.0
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException;
/**
* Indicates whether this file service supports code page conversion using
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
index 89044daf272..a338ec58ed6 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java
@@ -1030,8 +1030,8 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, isBinary, monitor), remoteParent, remoteFile, this);
}
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
- return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, isBinary, options, monitor), remoteParent, remoteFile, this);
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException {
+ return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, options, monitor), remoteParent, remoteFile, this);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
index f44255835e9..2209413c3bb 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/IRemoteFileSubSystem.java
@@ -659,8 +659,7 @@ public interface IRemoteFileSubSystem extends ISubSystem {
* @param monitor the progress monitor.
* @throws SystemMessageException if an error occurs.
* @since 2.0
- * @deprecated As of 3.0M4, replaced by
- * {@link #getOutputStream(String, String, boolean, int, IProgressMonitor)}
+ * @deprecated Use {@link #getOutputStream(String, String, boolean, IProgressMonitor)} instead
*/
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
@@ -668,14 +667,13 @@ public interface IRemoteFileSubSystem extends ISubSystem {
* Gets the output stream to write/append to a remote file. Clients should close the output stream when done. Implementations should not return null
.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
- * @param isBinary true
if the file is a binary file, false
otherwise.
- * @param options bit wise or of option constants. Valid constants are {@link IFileService#APPEND} and {@link IFileService#NONE}
+ * @param options bit wise or of option constants. Valid constants are {@link IFileService#APPEND}, {@link IFileService#TEXT_MODE}, and {@link IFileService#NONE}
* @return the input stream to access the contents of the remote file.
* @param monitor the progress monitor.
* @throws SystemMessageException if an error occurs.
* @since 3.0
*/
- public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
+ public OutputStream getOutputStream(String remoteParent, String remoteFile, int options, IProgressMonitor monitor) throws SystemMessageException;
/**
* Indicates whether this file subsystem supports code page conversion using