Java Base64 base64()

Here you can find the source of base64()

Description

base

License

Open Source License

Declaration

public static String base64() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String base64() {
        String systemName = systemName();
        String ret;// ww  w  . ja v a 2  s .  c  o m
        if ("Linux".equals(systemName)) {
            ret = "base64 -w";
        } else if ("Mac OS X".equals(systemName)) {
            ret = "base64 -b";
        } else {
            throw new RuntimeException(String.format("%s is not a supported platform.", systemName));
        }
        return ret;
    }

    public static String systemName() {
        return System.getProperty("os.name");
    }
}

Related

  1. base64(byte[] buf)
  2. base64(byte[] buff)
  3. base64(byte[] data)
  4. base64(byte[] raw)