diff src/ch/ethz/ssh2/SCPOutputStream.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/SCPOutputStream.java	Wed Jul 30 12:09:51 2014 -0700
+++ b/src/ch/ethz/ssh2/SCPOutputStream.java	Wed Jul 30 14:16:58 2014 -0700
@@ -14,48 +14,36 @@
 /**
  * @version $Id: SCPOutputStream.java 151 2014-04-28 10:03:39Z dkocher@sudo.ch $
  */
-public class SCPOutputStream extends BufferedOutputStream
-{
-
-	private Session session;
-
-	private SCPClient scp;
+public class SCPOutputStream extends BufferedOutputStream {
 
-	public SCPOutputStream(SCPClient client, Session session, final String remoteFile, long length, String mode) throws IOException
-	{
-		super(session.getStdin(), 40000);
-		this.session = session;
-		this.scp = client;
+    private Session session;
 
-		InputStream is = new BufferedInputStream(session.getStdout(), 512);
-
-		scp.readResponse(is);
-
-		String cline = "C" + mode + " " + length + " " + remoteFile + "\n";
-
-		super.write(StringEncoder.GetBytes(cline));
-		this.flush();
+    private SCPClient scp;
 
-		scp.readResponse(is);
-	}
-
-	@Override
-	public void close() throws IOException
-	{
-		try
-		{
-			this.write(0);
-			this.flush();
+    public SCPOutputStream(SCPClient client, Session session, final String remoteFile, long length, String mode) throws IOException {
+        super(session.getStdin(), 40000);
+        this.session = session;
+        this.scp = client;
+        InputStream is = new BufferedInputStream(session.getStdout(), 512);
+        scp.readResponse(is);
+        String cline = "C" + mode + " " + length + " " + remoteFile + "\n";
+        super.write(StringEncoder.GetBytes(cline));
+        this.flush();
+        scp.readResponse(is);
+    }
 
-			scp.readResponse(session.getStdout());
-
-			this.write(StringEncoder.GetBytes("E\n"));
-			this.flush();
-		}
-		finally
-		{
-			if (session != null)
-				session.close();
-		}
-	}
+    @Override
+    public void close() throws IOException {
+        try {
+            this.write(0);
+            this.flush();
+            scp.readResponse(session.getStdout());
+            this.write(StringEncoder.GetBytes("E\n"));
+            this.flush();
+        }
+        finally {
+            if (session != null)
+                session.close();
+        }
+    }
 }