Package com.rackspacecloud.client.cloudfiles

Examples of com.rackspacecloud.client.cloudfiles.FilesClient.deleteObject()


      }
     
      // Clean up
      for (int i=0; i < 10; i++) {
        client.deleteObject(containerName, "foo/testfile" + i + ".bogus");
        client.deleteObject(containerName, "bar/testfile" + i + ".bogus");
      }
      assertTrue(client.deleteContainer(containerName));
     
    }
    catch (Exception e) {
View Full Code Here


      }
      assertArrayEquals(randomData, otherData);
      assertEquals(-1, is.read()); // Could hang if there's a bug on the other end
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
     
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      }
      assertArrayEquals(randomData, otherData);
      assertEquals(-1, is.read()); // Could hang if there's a bug on the other end
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
     
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      is.read(otherData);
      assertArrayEquals(randomData, otherData);
      assertEquals(-1, is.read()); // Could hang if there's a bug on the other end
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
     
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

     
      // Make sure we can get the container info
      assertNotNull(client.getContainerInfo(containerName));
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
     
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here

      // See that the CDN URL works
      FilesObject obj = objects.get(0);
      assertEquals(cdnUrl + "/" + filename, obj.getCDNURL());
     
      // Clean up
      client.deleteObject(containerName, filename);
      assertTrue(client.deleteContainer(containerName));
     
    } catch (Exception e) {
      fail(e.getMessage());
    }
View Full Code Here

      throws MalformedURLException, IOException {
    FilesClient conn = attachment.cloudFilesConnection();
    String bucket = attachment.container();
    String key = attachment.key();
    try {
      conn.deleteObject(bucket, key);
    }
    catch (FilesNotFoundException e) {
      throw new IOException("Failed to delete '" + bucket + "/" + key
          + "' to CloudFiles: Error " + e.getHttpStatusCode()
          + ": " + e.getHttpStatusMessage());
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.