当前位置: 首页>>代码示例>>Java>>正文


Java Base64.decode方法代码示例

本文整理汇总了Java中org.apache.axis.encoding.Base64.decode方法的典型用法代码示例。如果您正苦于以下问题:Java Base64.decode方法的具体用法?Java Base64.decode怎么用?Java Base64.decode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis.encoding.Base64的用法示例。


在下文中一共展示了Base64.decode方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getExtFileTestSet

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
@Override
public TestFileItem[] getExtFileTestSet(String resName, String fileExt) {
  String img = TEST_ICON_SET.get(fileExt);
  
  return new TestFileItem[] {
      new TestFileItem(Base64.decode(img), 
          "{\"base64\":\"" + img +"\"}")};
}
 
开发者ID:osbitools,项目名称:OsBiToolsWs,代码行数:9,代码来源:PdTestFileUtils.java

示例2: decode

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static String decode(String base64)
   {
if(base64 == null)
    return null;

try {
    return new String(Base64.decode(base64), UTF8);
}
catch (Throwable e) {
    return null;
}
   }
 
开发者ID:nomencurator,项目名称:taxonaut,代码行数:13,代码来源:Base64Codex.java

示例3: run

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
@Override
public void run()
{
  try
  {
    String[] directories = new String[] { BirtConstants.CACHE_DIR, BirtConstants.IMGS_DIR };

    for (String dir : directories)
    {
      File directory = new File(dir);

      File[] files = directory.listFiles();

      if (files != null)
      {
        for (File file : files)
        {
          String sessionId = new String(Base64.decode(file.getName()));

          if (!SessionFacade.containsSession(sessionId))
          {
            FileIO.deleteDirectory(file);
          }
        }
      }
    }
  }
  catch (Exception e)
  {
    log.error(e);
  }
}
 
开发者ID:terraframe,项目名称:geoprism,代码行数:33,代码来源:CacheDocumentManager.java

示例4: decode

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static byte[] decode(String str){
    return Base64.decode(str);
}
 
开发者ID:1991wangliang,项目名称:lorne_core,代码行数:4,代码来源:Base64Utils.java

示例5: getDemoExFileAsBytes

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
@Override
public byte[] getDemoExFileAsBytes(String resName, String ext) {
  return Base64.decode(DEMO_ICON_SET.get(ext));
}
 
开发者ID:osbitools,项目名称:OsBiToolsWs,代码行数:5,代码来源:PdTestFileUtils.java

示例6: decodeString

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static byte[] decodeString (String in) {
	return Base64.decode (in);
}
 
开发者ID:NCAR,项目名称:dls-repository-stack,代码行数:4,代码来源:ContentUtils.java

示例7: decodeDataPointsBase64

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static DataPoint[] decodeDataPointsBase64(char encodedData[]) {
byte[] bytes = Base64.decode(new String(encodedData));
DataPoint dataPoints[] = decodeDataPointsFromBytes(bytes);
return dataPoints;
   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:6,代码来源:ScanUtils.java

示例8: main

import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static void main(String[] args)
		throws Exception
	{
		// some parameters
		String analysisEndpoint = "http://ccis1716.duhs.duke.edu/wsrf/services/cagrid/RProteomics";
		//String analysisEndpoint = "http://localhost:8080/wsrf/services/cagrid/RProteomics";
		File imageFile = new File("plot.jpg");
		
		// some helper objects
		Date start = null;
		Date end = null;
		SimpleDateFormat dateFormat = new SimpleDateFormat("hh:mm:ss");
		
		// construct client
		RProteomicsClient client = new RProteomicsClient(analysisEndpoint);
		
		// preprocessing: read data from file
		ScanFeaturesType[] startScans = ServiceUtils.readScanFeaturesFromDir(new File("data"));
		
		// step 3: interpolate
		start = new Date();
		System.out.println("Running general_interpolate at " + dateFormat.format(start));
		ScanFeaturesType[] scans = client.general_interpolateByValue(startScans);
		end = new Date();
		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
		
//		// step 4: determine background
//		start = new Date();
//		System.out.println("Running removeBackground_runningQuantile at " + dateFormat.format(start));
//		ScanFeaturesType[] bgScans = client.removeBackground_runningQuantileByValue(
//			scans, new WindowType(1023), new PercentileType(75)
//		);
//		end = new Date();
//		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
//		
//		// step 5: subtract background
//		start = new Date();
//		System.out.println("Running removeBackground_minus at " + dateFormat.format(start));
//		scans = client.removeBackground_minusByValue(scans, bgScans);
//		end = new Date();
//		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
//
//		// step 6: denoise
//		start = new Date();
//		System.out.println("Running denoise_waveletUDWTW at " + dateFormat.format(start));
//		ThresholdType threshold = new ThresholdType();
//		threshold.setMultiplier(new Double(1));
//		scans = client.denoise_waveletUDWTWByValue(scans, new WindowType(1024), threshold);
//		end = new Date();
//		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
//		
//		// step 7: align
//		start = new Date();
//		System.out.println("Running align_alignx at " + dateFormat.format(start));
//		scans = client.align_alignxByValue(scans);
//		end = new Date();
//		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
//		
//		// step 8: normalize
//		start = new Date();
//		System.out.println("Running normalize_quantile at " + dateFormat.format(start));
//		scans = client.normalize_quantileByValue(scans, new QuantileType(1));
//		end = new Date();
//		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
		
		// step 9: plot data
		start = new Date();
		System.out.println("Running plot_2DStacked at " + dateFormat.format(start));
		//JpegImageType image = client.plot_2DStackedByValue(startScans, scans);
		JpegImageType image = client.plot_2DByValue(scans);
		end = new Date();
		System.out.println("  completed at " + dateFormat.format(end) + " in " + getDuration(start, end) + " second(s)");
				
		// post processing: write image to file
		byte[] imageBytes = Base64.decode(image.getData());
		BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(imageFile));
		os.write(imageBytes);
		os.flush();
		os.close();		
	}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:81,代码来源:AnnualMeetingWorkflowDemo.java


注:本文中的org.apache.axis.encoding.Base64.decode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。