org.apache.axis.encoding.Base64.encode()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(256)

本文整理了Java中org.apache.axis.encoding.Base64.encode()方法的一些代码示例,展示了Base64.encode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Base64.encode()方法的具体详情如下:
包路径:org.apache.axis.encoding.Base64
类名称:Base64
方法名:encode

Base64.encode介绍

[英]Returns base64 representation of specified byte array.
[中]返回指定字节数组的base64表示形式。

代码示例

代码示例来源:origin: axis/axis

/**
 * Returns base64 representation of specified byte array.
 */
public static String encode(byte[] data) {
  return encode(data, 0, data.length);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Returns base64 representation of specified byte array.
 */
public static String encode(byte[] data) {
  return encode(data, 0, data.length);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Returns base64 representation of specified byte array.
 */
public static String encode(byte[] data) {
  return encode(data, 0, data.length);
}

代码示例来源:origin: com.github.1991wangliang/lorne_core

public static String encode(byte[] bs){
  return Base64.encode(bs);
}

代码示例来源:origin: org.apache.axis/axis

public String getValueAsString(Object value, SerializationContext context) {
  byte[] data = null;
  if (javaType == byte[].class) {
    data = (byte[]) value;
  } else {
    data = new byte[ ((Byte[]) value).length ];
    for (int i=0; i<data.length; i++) {
      Byte b = ((Byte[]) value)[i];
      if (b != null)
        data[i] = b.byteValue();
    }
  }
  return Base64.encode(data, 0, data.length);
}

代码示例来源:origin: axis/axis

public String getValueAsString(Object value, SerializationContext context) {
  byte[] data = null;
  if (javaType == byte[].class) {
    data = (byte[]) value;
  } else {
    data = new byte[ ((Byte[]) value).length ];
    for (int i=0; i<data.length; i++) {
      Byte b = ((Byte[]) value)[i];
      if (b != null)
        data[i] = b.byteValue();
    }
  }
  return Base64.encode(data, 0, data.length);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

public String getValueAsString(Object value, SerializationContext context) {
  byte[] data = null;
  if (javaType == byte[].class) {
    data = (byte[]) value;
  } else {
    data = new byte[ ((Byte[]) value).length ];
    for (int i=0; i<data.length; i++) {
      Byte b = ((Byte[]) value)[i];
      if (b != null)
        data[i] = b.byteValue();
    }
  }
  return Base64.encode(data, 0, data.length);
}

代码示例来源:origin: net.sf.taverna.cagrid/cagrid-wsdl-generic

String encoded = Base64.encode((byte[]) dataValue);
element.appendChild(element.getOwnerDocument().createTextNode(
    encoded));

代码示例来源:origin: axis/axis

otherHeaders.append(HTTPConstants.HEADER_PROXY_AUTHORIZATION)
      .append(": Basic ")
      .append(Base64.encode(tmpBuf.toString().getBytes()))
      .append("\r\n");

代码示例来源:origin: org.apache.axis/axis

otherHeaders.append(HTTPConstants.HEADER_PROXY_AUTHORIZATION)
      .append(": Basic ")
      .append(Base64.encode(tmpBuf.toString().getBytes()))
      .append("\r\n");

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

otherHeaders.append(HTTPConstants.HEADER_PROXY_AUTHORIZATION)
      .append(": Basic ")
      .append(Base64.encode(tmpBuf.toString().getBytes()))
      .append("\r\n");

代码示例来源:origin: net.sf.taverna.cagrid/cagrid-wsdl-generic

private Element buildElementFromObject(String key, Object dataObject)
    throws JDOMException, IOException {
  Element dataElement = null;
  if (isXMLInput(key)) {
    dataElement = createDataElementForXMLInput(dataObject, key);
  } else {
    dataElement = new Element(key);
    setDataElementNamespace(key, dataElement);
    if (dataObject.toString().equals("nil")) {
      dataElement.setAttribute("nil", "true"); // changes nil value
      // to nil=true
      // attribute.
    } else {
      if (dataObject instanceof byte[]) {
        dataElement
            .setAttribute(
                "type",
                "xsd:base64Binary",
                org.jdom.Namespace
                    .getNamespace("xsi",
                        "http://www.w3.org/2001/XMLSchema-instance"));
        dataObject = Base64
            .encode(((byte[]) dataObject));
      }
      dataElement.setText(dataObject.toString());
    }
  }
  return dataElement;
}

代码示例来源:origin: axis/axis

paramElement = (org.w3c.dom.Element) n;
String MD5String = org.apache.axis.encoding.Base64.encode(md.digest());
String senddata = " elapsedTime=" + elapsedTimeStr + " MD5=" + MD5String;

代码示例来源:origin: axis/axis

otherHeaders.append(HTTPConstants.HEADER_AUTHORIZATION)
    .append(": Basic ")
    .append(Base64.encode(tmpBuf.toString().getBytes()))
    .append("\r\n");

代码示例来源:origin: org.apache.axis/axis

paramElement = (org.w3c.dom.Element) n;
String MD5String = org.apache.axis.encoding.Base64.encode(md.digest());
String senddata = " elapsedTime=" + elapsedTimeStr + " MD5=" + MD5String;

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

paramElement = (org.w3c.dom.Element) n;
String MD5String = org.apache.axis.encoding.Base64.encode(md.digest());
String senddata = " elapsedTime=" + elapsedTimeStr + " MD5=" + MD5String;

代码示例来源:origin: uk.org.mygrid.resources/boca-servlet

SerializationUtils.setEncoding(childElement2);
if (SerializationUtils.BASE64_ENABLED) {
  childElement2.addTextNode(Base64.encode(bos.toByteArray()));
} else {
  childElement2.addTextNode(new String(bos.toByteArray(), Constants.byteEncoding));

代码示例来源:origin: uk.org.mygrid.resources/boca-servlet

childElement2.addTextNode(Base64.encode(bos.toByteArray()));
} else {
  childElement2.addTextNode(new String(bos.toByteArray(), Constants.byteEncoding));

代码示例来源:origin: apache/uima-uimaj

String base64str = Base64.encode(bytes);
context.writeChars(base64str.toCharArray(), 0, base64str.length());
context.endElement();

代码示例来源:origin: apache/uima-uimaj

String base64str = Base64.encode(bytes);
context.writeChars(base64str.toCharArray(), 0, base64str.length());
context.endElement();

相关文章