From 2b6be4143de6f0fe9f8a285146d61cb76573a872 Mon Sep 17 00:00:00 2001
From: Kushal Munir < kmunir@ca.ibm.com>
Date: Thu, 29 Mar 2007 15:42:13 +0000
Subject: [PATCH] [179850] [api] Introduce methods to get input stream and
output stream in IRemoteFileSubSystem. Remove default implementations in
RemoteFileSubSystem and add javadoc to clarify that implementations should
not be returning null.
---
.../core/subsystems/IRemoteFileSubSystem.java | 5 ++---
.../core/subsystems/RemoteFileSubSystem.java | 16 ----------------
2 files changed, 2 insertions(+), 19 deletions(-)
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 fd1a9ddc8cf..83dc1a8ffef 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
@@ -22,7 +22,6 @@ import java.io.OutputStream;
import java.net.InetAddress;
import java.util.List;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.model.SystemRemoteResourceSet;
@@ -492,7 +491,7 @@ public interface IRemoteFileSubSystem extends ISubSystem {
public InetAddress getLocalAddress();
/**
- * Gets the input stream to access the contents a remote file. Clients should close the input stream when done.
+ * Gets the input stream to access the contents a remote file. Clients should close the input 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.
@@ -504,7 +503,7 @@ public interface IRemoteFileSubSystem extends ISubSystem {
public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException;
/**
- * Gets the output stream to write to a remote file. Clients should close the output stream when done.
+ * Gets the output stream to write 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.
diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
index e7d8c089d1e..99c454df17e 100644
--- a/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
+++ b/rse/plugins/org.eclipse.rse.subsystems.files.core/src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java
@@ -1511,20 +1511,4 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
public String getRemoteEncoding() {
return System.getProperty("file.encoding"); //$NON-NLS-1$
}
-
- /**
- * The default implementation returns null
. Subclasses should override if necessary.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#getInputStream(java.lang.String, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
- */
- public InputStream getInputStream(String remoteParent, String remoteFile, boolean isBinary, IProgressMonitor monitor) throws SystemMessageException {
- return null;
- }
-
- /**
- * The default implementation returns null
. Subclasses should override if necessary.
- * @see org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem#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 {
- return null;
- }
}
\ No newline at end of file