diff options
author | eutarass | 2009-05-05 18:55:28 +0000 |
---|---|---|
committer | eutarass | 2009-05-05 18:55:28 +0000 |
commit | 4f3401d7e95f5e574f1d48253d2af93b13622ebe (patch) | |
tree | f67c44e8f471071852ea8ec47ca66ee3d9d1cc72 /plugins/org.eclipse.tm.tcf.rse | |
parent | cb04e6af24a43aa0764dfcb28e504605634264a7 (diff) | |
download | org.eclipse.tcf-4f3401d7e95f5e574f1d48253d2af93b13622ebe.tar.gz org.eclipse.tcf-4f3401d7e95f5e574f1d48253d2af93b13622ebe.tar.xz org.eclipse.tcf-4f3401d7e95f5e574f1d48253d2af93b13622ebe.zip |
Added pre-built TCF Agent binary RPMs for Red Hat Linux
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.rse')
-rw-r--r-- | plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java index 7426ad1a3..1af8c5fe8 100644 --- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java +++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileService.java @@ -240,13 +240,13 @@ public class TCFFileService extends AbstractFileService { public void download(final String parent, final String name, final File file, final boolean is_binary, final String host_encoding, IProgressMonitor monitor) throws SystemMessageException { - IHostFile hostFile = getFile(parent, name, new NullProgressMonitor());
- monitor.beginTask("Downloading " + toRemotePath(parent, name) + " ...", Long.valueOf(hostFile.getSize() / 1024).intValue()); //$NON-NLS-1$ //$NON-NLS-2$
+ IHostFile hostFile = getFile(parent, name, new NullProgressMonitor()); + monitor.beginTask("Downloading " + toRemotePath(parent, name) + " ...", Long.valueOf(hostFile.getSize() / 1024).intValue()); //$NON-NLS-1$ //$NON-NLS-2$ try { file.getParentFile().mkdirs(); InputStream inp = getInputStream(parent, name, is_binary, new NullProgressMonitor()); OutputStream out = new BufferedOutputStream(new FileOutputStream(file)); - copyStream(inp, out, is_binary, "UTF8", host_encoding, monitor); //$NON-NLS-1$
+ copyStream(inp, out, is_binary, "UTF8", host_encoding, monitor); //$NON-NLS-1$ } catch (Exception x) { if (x instanceof SystemMessageException) throw (SystemMessageException)x; @@ -527,8 +527,8 @@ public class TCFFileService extends AbstractFileService { monitor.beginTask("Upload", 1); //$NON-NLS-1$ try { OutputStream out = getOutputStream(parent, name, isBinary, new NullProgressMonitor()); - // As we cannot determine the local file size, redirect the worked ticks to a NullProgressMonitor.
- copyStream(inp, out, isBinary, hostEncoding, "UTF8", new NullProgressMonitor()); //$NON-NLS-1$
+ // As we cannot determine the local file size, redirect the worked ticks to a NullProgressMonitor. + copyStream(inp, out, isBinary, hostEncoding, "UTF8", new NullProgressMonitor()); //$NON-NLS-1$ } catch (Throwable x) { if (x instanceof SystemMessageException) throw (SystemMessageException)x; @@ -543,11 +543,11 @@ public class TCFFileService extends AbstractFileService { String parent, String name, boolean isBinary, String srcEncoding, String hostEncoding, IProgressMonitor monitor) throws SystemMessageException { - monitor.beginTask("Uploading " + localFile.toString() + " ...", Long.valueOf(localFile.length() / 1024).intValue()); //$NON-NLS-1$ //$NON-NLS-2$
+ monitor.beginTask("Uploading " + localFile.toString() + " ...", Long.valueOf(localFile.length() / 1024).intValue()); //$NON-NLS-1$ //$NON-NLS-2$ try { OutputStream out = getOutputStream(parent, name, isBinary, new NullProgressMonitor()); InputStream inp = new BufferedInputStream(new FileInputStream(localFile)); - copyStream(inp, out, isBinary, hostEncoding, "UTF8", monitor); //$NON-NLS-1$
+ copyStream(inp, out, isBinary, hostEncoding, "UTF8", monitor); //$NON-NLS-1$ } catch (Throwable x) { if (x instanceof SystemMessageException) throw (SystemMessageException)x; @@ -559,7 +559,7 @@ public class TCFFileService extends AbstractFileService { } private void copyStream(InputStream inp, OutputStream out, - boolean is_binary, String inp_encoding, String out_encoding, IProgressMonitor monitor) throws IOException {
+ boolean is_binary, String inp_encoding, String out_encoding, IProgressMonitor monitor) throws IOException { try { if (!is_binary) { if (inp_encoding == null || inp_encoding.equals("UTF-8")) inp_encoding = "UTF8"; //$NON-NLS-1$ //$NON-NLS-2$ @@ -571,7 +571,7 @@ public class TCFFileService extends AbstractFileService { int buf_len = inp.read(buf); if (buf_len < 0) break; out.write(buf, 0, buf_len); - if (monitor != null) monitor.worked(buf_len / 1024);
+ if (monitor != null) monitor.worked(buf_len / 1024); } } else { @@ -582,7 +582,7 @@ public class TCFFileService extends AbstractFileService { int buf_len = reader.read(buf); if (buf_len < 0) break; writer.write(buf, 0, buf_len); - if (monitor != null) monitor.worked(buf_len / 1024);
+ if (monitor != null) monitor.worked(buf_len / 1024); } writer.flush(); } |