Amazon Simple Queue Service
开发人员指南
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。点 击 Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Base64 编码的 Java 示例代码

请求签名必须采用 Base64 编码。以下 Java 示例代码显示了如何执行 Base64 编码。

Copy
package amazon.webservices.common; /** * This class defines common routines for encoding data in AWS requests. */ public class Encoding { /** * Performs base64-encoding of input bytes. * * @param rawData * Array of bytes to be encoded. * @return * The base64 encoded string representation of rawData. */ public static String EncodeBase64(byte[] rawData) { return Base64.encodeBytes(rawData); } }