Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.util.Base64;

public class Main {

    public static String getBase64Code(String str, long port) {
        byte[] b = Base64.encode(str.getBytes(), Base64.DEFAULT);
        return "http://127.0.0.1:" + port + "/play?enc=base64&url=" + new String(b) + "&taskid=&mediatype=m3u8";
    }
}