本文整理汇总了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 +"\"}")};
}
示例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;
}
}
示例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);
}
}
示例4: decode
import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static byte[] decode(String str){
return Base64.decode(str);
}
示例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));
}
示例6: decodeString
import org.apache.axis.encoding.Base64; //导入方法依赖的package包/类
public static byte[] decodeString (String in) {
return Base64.decode (in);
}
示例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;
}
示例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();
}