Package com.amazonaws.services.s3.internal

Examples of com.amazonaws.services.s3.internal.XmlWriter.start()


        XmlWriter xml = new XmlWriter();
        xml.start("WebsiteConfiguration", "xmlns", Constants.XML_NAMESPACE);

        if (websiteConfiguration.getIndexDocumentSuffix() != null) {
            XmlWriter indexDocumentElement = xml.start("IndexDocument");
            indexDocumentElement.start("Suffix").value(websiteConfiguration.getIndexDocumentSuffix()).end();
            indexDocumentElement.end();
        }

        if (websiteConfiguration.getErrorDocument() != null) {
            XmlWriter errorDocumentElement = xml.start("ErrorDocument");
View Full Code Here


            indexDocumentElement.end();
        }

        if (websiteConfiguration.getErrorDocument() != null) {
            XmlWriter errorDocumentElement = xml.start("ErrorDocument");
            errorDocumentElement.start("Key").value(websiteConfiguration.getErrorDocument()).end();
            errorDocumentElement.end();
        }

        xml.end();
        return xml.getBytes();
View Full Code Here

    </LifecycleConfiguration>   
    */   
    public byte[] convertToXmlByteArray(BucketLifecycleConfiguration config) throws AmazonClientException {
       
        XmlWriter xml = new XmlWriter();
        xml.start("LifecycleConfiguration");
       
        for (Rule rule : config.getRules()) {
            writeRule(xml, rule);
        }

View Full Code Here

     </CORSConfiguration>
     */   
    public byte[] convertToXmlByteArray(BucketCrossOriginConfiguration config) throws AmazonClientException {
       
        XmlWriter xml = new XmlWriter();
        xml.start("CORSConfiguration", "xmlns", Constants.XML_NAMESPACE);
       
        for (CORSRule rule : config.getRules()) {
            writeRule(xml, rule);
        }

View Full Code Here

      </Tagging>   
    */   
    public byte[] convertToXmlByteArray(BucketTaggingConfiguration config) throws AmazonClientException {
       
        XmlWriter xml = new XmlWriter();
        xml.start("Tagging");
       
        for (TagSet tagset : config.getAllTagSets()) {
            writeRule(xml, tagset);
        }

View Full Code Here

         * We can only send the CreateBucketConfiguration if we're *not*
         * creating a bucket in the US region.
         */
        if (region != null && !region.toUpperCase().equals(Region.US_Standard.toString())) {
            XmlWriter xml = new XmlWriter();
            xml.start("CreateBucketConfiguration", "xmlns", Constants.XML_NAMESPACE);
            xml.start("LocationConstraint").value(region).end();
            xml.end();

            httpRequest.setContent(new ByteArrayInputStream(xml.getBytes()));
        }
View Full Code Here

        if (owner == null) {
            throw new AmazonClientException("Invalid AccessControlList: missing an S3Owner");
        }

        XmlWriter xml = new XmlWriter();
        xml.start("AccessControlPolicy", "xmlns", Constants.XML_NAMESPACE);
        xml.start("Owner");
        if (owner.getId() != null) {
            xml.start("ID").value(owner.getId()).end();
        }
        if (owner.getDisplayName() != null) {
View Full Code Here

            throw new AmazonClientException("Invalid AccessControlList: missing an S3Owner");
        }

        XmlWriter xml = new XmlWriter();
        xml.start("AccessControlPolicy", "xmlns", Constants.XML_NAMESPACE);
        xml.start("Owner");
        if (owner.getId() != null) {
            xml.start("ID").value(owner.getId()).end();
        }
        if (owner.getDisplayName() != null) {
            xml.start("DisplayName").value(owner.getDisplayName()).end();
View Full Code Here

        XmlWriter xml = new XmlWriter();
        xml.start("AccessControlPolicy", "xmlns", Constants.XML_NAMESPACE);
        xml.start("Owner");
        if (owner.getId() != null) {
            xml.start("ID").value(owner.getId()).end();
        }
        if (owner.getDisplayName() != null) {
            xml.start("DisplayName").value(owner.getDisplayName()).end();
        }
        xml.end();
View Full Code Here

        xml.start("Owner");
        if (owner.getId() != null) {
            xml.start("ID").value(owner.getId()).end();
        }
        if (owner.getDisplayName() != null) {
            xml.start("DisplayName").value(owner.getDisplayName()).end();
        }
        xml.end();
        xml.start("AccessControlList");
        for (Grant grant : acl.getGrants()) {
            xml.start("Grant");
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.