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

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

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

Base64.decode介绍

暂无

代码示例

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

public static byte[] decode(String str){
  return Base64.decode(str);
}

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

/**
   * Convert the string that has been accumulated into an Object.  Subclasses
   * may override this.  Note that if the javaType is a primitive, the returned
   * object is a wrapper class.
   * @param source the serialized value to be deserialized
   * @throws Exception any exception thrown by this method will be wrapped
   */
  public Object makeValue(String source) throws Exception {
    byte [] value = Base64.decode(source);
    
    if (value == null) {
      if (javaType == Byte[].class) {
        return new Byte[0];
      } else {
        return new byte[0];
      }
    }
    
    if (javaType == Byte[].class) {
      Byte[] data = new Byte[ value.length ];
      for (int i=0; i<data.length; i++) {
        byte b = value[i];
        data[i] = new Byte(b);
      }
      return data;
    }
    return value;
  }
}

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

/**
   * Convert the string that has been accumulated into an Object.  Subclasses
   * may override this.  Note that if the javaType is a primitive, the returned
   * object is a wrapper class.
   * @param source the serialized value to be deserialized
   * @throws Exception any exception thrown by this method will be wrapped
   */
  public Object makeValue(String source) throws Exception {
    byte [] value = Base64.decode(source);
    
    if (value == null) {
      if (javaType == Byte[].class) {
        return new Byte[0];
      } else {
        return new byte[0];
      }
    }
    
    if (javaType == Byte[].class) {
      Byte[] data = new Byte[ value.length ];
      for (int i=0; i<data.length; i++) {
        byte b = value[i];
        data[i] = new Byte(b);
      }
      return data;
    }
    return value;
  }
}

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

/**
   * Convert the string that has been accumulated into an Object.  Subclasses
   * may override this.  Note that if the javaType is a primitive, the returned
   * object is a wrapper class.
   * @param source the serialized value to be deserialized
   * @throws Exception any exception thrown by this method will be wrapped
   */
  public Object makeValue(String source) throws Exception {
    byte [] value = Base64.decode(source);
    
    if (value == null) {
      if (javaType == Byte[].class) {
        return new Byte[0];
      } else {
        return new byte[0];
      }
    }
    
    if (javaType == Byte[].class) {
      Byte[] data = new Byte[ value.length ];
      for (int i=0; i<data.length; i++) {
        byte b = value[i];
        data[i] = new Byte(b);
      }
      return data;
    }
    return value;
  }
}

代码示例来源:origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public boolean addBase64EncodedAttachmentsToIssue(final String token, final String issueKey, final String[] fileNames, final String[] base64EncodedAttachmentData)
    throws RemoteException
{
  User user = tokenManager.retrieveUser(token);
  byte[][] dataBytes = null;
  if (base64EncodedAttachmentData != null)
  {
    dataBytes = new byte[base64EncodedAttachmentData.length][];
    for (int i = 0; i < base64EncodedAttachmentData.length; i++)
    {
      dataBytes[i] = Base64.decode(base64EncodedAttachmentData[i]);
    }
  }
  return issueService.addAttachmentsToIssue(user, issueKey, fileNames, dataBytes);
}

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

int  i ;
tmp = new String( Base64.decode( tmp.substring(6) ) );
i = tmp.indexOf( ':' );
if ( i == -1 ) user = tmp ;

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

/**
 * @see org.apache.axis.encoding.Deserializer#onEndElement(java.lang.String, java.lang.String,
 *      org.apache.axis.encoding.DeserializationContext)
 */
public void onEndElement(String arg0, String arg1, DeserializationContext arg2)
    throws SAXException {
 try {
  // System.out.println("onEndElement(" + arg0 + "," + arg1 + ")");
  // deserialize (if not done already via attachments)
  if (this.getValue() == null) {
   // System.out.println("deserializing - no attachments found"); //DEBUG
   String base64str = buf.toString();
   // System.out.println("Base64str: " + base64str);
   if (base64str.length() > 0) {
    byte[] bytes = Base64.decode(base64str);
    setValue(SerializationUtils.deserialize(bytes));
   }
  }
 } catch (Exception e) {
  e.printStackTrace();
  throw new SAXException(e);
 }
}

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

/**
 * @see org.apache.axis.encoding.Deserializer#onEndElement(java.lang.String, java.lang.String,
 *      org.apache.axis.encoding.DeserializationContext)
 */
public void onEndElement(String arg0, String arg1, DeserializationContext arg2)
    throws SAXException {
 try {
  // System.out.println("onEndElement(" + arg0 + "," + arg1 + ")");
  // deserialize (if not done already via attachments)
  if (this.getValue() == null) {
   // System.out.println("deserializing - no attachments found"); //DEBUG
   String base64str = buf.toString();
   // System.out.println("Base64str: " + base64str);
   if (base64str.length() > 0) {
    byte[] bytes = Base64.decode(base64str);
    setValue(SerializationUtils.deserialize(bytes));
   }
  }
 } catch (Exception e) {
  e.printStackTrace();
  throw new SAXException(e);
 }
}

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

int  i ;
tmp = new String( Base64.decode( tmp.substring(6) ) );
i = tmp.indexOf( ':' );
if ( i == -1 ) user = tmp ;

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

queryArray = newBuf;
String query = new String(Base64.decode(queryArray, 0, queryArray.length), Constants.byteEncoding);
Collection<Statement> resultsGraph = queryIndex(username, password, query, queryLanguageUri, startIndex, numResults, format);
ByteArrayOutputStream baos = new ByteArrayOutputStream();

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

int  i ;
tmp = new String( Base64.decode( tmp.substring(6) ) );
i = tmp.indexOf( ':' );
if ( i == -1 ) user = tmp ;

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

.equals("'application/octet-stream'")) { // base64Binary
byte[] data = Base64.decode(child
    .getText());
result.put(child.getName(), data);

代码示例来源:origin: se.skltp.adapterservices.se.apotekensservice/TicketMachine

gt.setIP(requestIP);
if ( b64LkTjTicket == null ){ b64LkTjTicket="";}
String lktjTicket = new String(Base64.decode(b64LkTjTicket));
if ( rollnamn == null ){ rollnamn="";}
if ( katalogId == null ){ katalogId="";}

代码示例来源:origin: se.skltp.adapterservices.se.apotekensservice/TicketMachine

gt.setIP(requestIP);
if ( b64BIFTicket == null ){ b64BIFTicket="";}
String bifTicket = new String(Base64.decode(b64BIFTicket));

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

byte[] decoded = Base64.decode(authInfo.toString());
StringBuffer userBuf = new StringBuffer();
StringBuffer pwBuf = new StringBuffer();

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

byte[] decoded = Base64.decode(authInfo.toString());
StringBuffer userBuf = new StringBuffer();
StringBuffer pwBuf = new StringBuffer();

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

byte[] decoded = Base64.decode(authInfo.toString());
StringBuffer userBuf = new StringBuffer();
StringBuffer pwBuf = new StringBuffer();

相关文章