Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2010-2015, Inc. or its affiliates. All Rights Reserved.
  * Licensed under the Apache License, Version 2.0 (the "License").
  * You may not use this file except in compliance with the License.
  * A copy of the License is located at
 * or in the "license" file accompanying this file. This file is distributed
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
Converts Request Payment Configuration objects into XML byte arrays.
public class RequestPaymentConfigurationXmlFactory {

Converts the specified request payment configuration into an XML byte array to send to Amazon S3. Sample XML: <RequestPaymentConfiguration xmlns=""> <Payer>Requester</Payer> </RequestPaymentConfiguration>

requestPaymentConfiguration The request payment configuration request to convert..
The XML byte array representation.
    public byte[] convertToXmlByteArray(
            RequestPaymentConfiguration requestPaymentConfiguration) {
        XmlWriter xml = new XmlWriter();
        Payer payer = requestPaymentConfiguration.getPayer();
        if (payer != null) {
            XmlWriter payerDocumentElement = xml.start("Payer");
        return xml.getBytes();
New to GrepCode? Check out our FAQ X