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

[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.

This commit is contained in:
Kushal Munir 2007-03-29 15:42:13 +00:00
parent 1ad8a9f0f7
commit 2b6be4143d
2 changed files with 2 additions and 19 deletions

View file

@ -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 <code>null</code>.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
* @param isBinary <code>true</code> if the file is a binary file, <code>false</code> 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 <code>null</code>.
* @param remoteParent the absolute path of the parent.
* @param remoteFile the name of the remote file.
* @param isBinary <code>true</code> if the file is a binary file, <code>false</code> otherwise.

View file

@ -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 <code>null</code>. 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 <code>null</code>. 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;
}
}