Examples of storeObject()


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

      client.createContainer(containerName);
     
      // Store it
      for (int i=0; i < 10; i++) {
        assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", "foo/testfile" + i + ".bogus", new HashMap<String,String>()));
        assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", "bar/testfile" + i + ".bogus", new HashMap<String,String>()));
      }
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(20, objects.size());
View Full Code Here

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

      // Set up
      client.createContainer(containerName);
     
      // Store it
      TesterCallback callback = new TesterCallback();
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>(), callback));
     
      // Make sure it all got written
      assertEquals(randomData.length, callback.bytesSent);
      assertEquals(randomData.length/8192 + 1, callback.nCalls);
     
View Full Code Here

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

     
      // Set up
      client.createContainer(containerName);
     
      // Store it
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
      assertEquals(1, objects.size());
      FilesObject obj = objects.get(0);
View Full Code Here

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

      // Set up
      client.createContainer(containerName);
      String cdnUrl = client.cdnEnableContainer(containerName);
     
      // Store it
      assertTrue(client.storeObject(containerName, randomData, "application/octet-stream", filename, new HashMap<String,String>()));
     
      // Make sure it's there
      List<FilesObject> objects = client.listObjects(containerName);
     
      // See that the CDN URL works
View Full Code Here

Examples of org.apache.cocoon.components.persistance.CastorSourceConverter.storeObject()

    CastorSourceConverter converter = null;
    try {
      source = (ModifiableSource)resolver.resolveURI(sourceURI);
      converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);

      converter.storeObject(source, profileName, profile);
    } finally {
      resolver.release(source);
      manager.release(converter);
      manager.release(resolver);
    }
View Full Code Here

Examples of org.apache.cocoon.components.persistance.CastorSourceConverter.storeObject()

        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(uri);
            if ( source instanceof ModifiableSource ) {
                converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);
                converter.storeObject( ((ModifiableSource)source).getOutputStream(), profileName, profile);
                return;
            }

        } finally {
            resolver.release(source);
View Full Code Here

Examples of org.apache.cocoon.components.persistance.CastorSourceConverter.storeObject()

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);

            ByteArrayOutputStream writer = new ByteArrayOutputStream();
       
            converter.storeObject(writer, profileName, profile);

            buffer.append("&content=");
            buffer.append(SourceUtil.encode(writer.toString()));

            source = resolver.resolveURI(buffer.toString());
View Full Code Here

Examples of org.apache.cocoon.components.persistance.CastorSourceConverter.storeObject()

        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(uri);
            if ( source instanceof ModifiableSource ) {
                converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);
                converter.storeObject( ((ModifiableSource)source).getOutputStream(), parameters, profile);
                return;
            }

        } finally {
            if ( resolver != null ) {
View Full Code Here

Examples of org.apache.cocoon.components.persistance.CastorSourceConverter.storeObject()

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);

            ByteArrayOutputStream writer = new ByteArrayOutputStream();
       
            converter.storeObject(writer, parameters, profile);

            buffer.append("&content=");
            buffer.append(SourceUtil.encode(writer.toString()));

            source = resolver.resolveURI(buffer.toString());
View Full Code Here

Examples of org.apache.cocoon.components.persistence.CastorSourceConverter.storeObject()

        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(uri);
            if ( source instanceof ModifiableSource ) {
                converter = (CastorSourceConverter) this.manager.lookup(CastorSourceConverter.ROLE);
                converter.storeObject( ((ModifiableSource)source).getOutputStream(), parameters, profile);
                return;
            }

        } finally {
            if ( resolver != null ) {
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.