dword To Byte - Java java.lang

Java examples for java.lang:String UTF

Description

dword To Byte

Demo Code


//package com.java2s;

public class Main {
    public static byte[] dwordToByte(double dblValue) {
        byte[] btReturn = new byte[4];
        for (int i = 0; i < 4; i++) {
            btReturn[i] = (byte) (dblValue % 256);
            dblValue = dblValue / 256;/*from   w w w. jav  a2s. c o  m*/
        }
        return btReturn;
    }
}

Related Tutorials