Convert byte To Byte Array - Android File Input Output

Android examples for File Input Output:Byte Array Convert

Description

Convert byte To Byte Array

Demo Code


//package com.java2s;
import android.annotation.SuppressLint;

public class Main {
    @SuppressLint("UseValueOf")
    public static byte[] byteToByteArray(byte value) {
        byte[] result = new byte[1];
        result[0] = new Byte((byte) value);

        return result;
    }/*from w  w w  . j a  v  a2 s  . c om*/
}

Related Tutorials