Package org.jclouds.io

Examples of org.jclouds.io.Payload.openStream()


      temp = File.createTempFile("foo", "bar");
      try {
         SshClient client = setupClient();
         client.put(temp.getAbsolutePath(), Payloads.newStringPayload("rabbit"));
         Payload input = setupClient().get(temp.getAbsolutePath());
         String contents = Strings2.toStringAndClose(input.openStream());
         assertEquals(contents, "rabbit");
      } finally {
         temp.delete();
      }
   }
View Full Code Here


   }

   @Test
   public void testGetEtcPassword() throws IOException {
      Payload input = setupClient().get("/etc/passwd");
      String contents = Strings2.toStringAndClose(input.openStream());
      assert contents.indexOf("root") >= 0 : "no root in " + contents;
   }

   @Test
   public void testExecHostname() throws IOException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.