Java Byte to String ByteToString(int b)

Here you can find the source of ByteToString(int b)

Description

converts the 8 lsb of the given integer to a String

License

LGPL

Parameter

Parameter Description
b a parameter

Return

the 8 lsb of the given integer as a String

Declaration

public static String ByteToString(int b) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**//from ww w.ja v a 2 s. co m
     * converts the 8 lsb of the given integer to a String
     * @param b
     * @return the 8 lsb of the given integer as a String
     */
    public static String ByteToString(int b) {
        return Integer.toBinaryString((b & 0xff) | 0x100).substring(1);
    }
}

Related

  1. ByteToString(byte b)
  2. byteToString(byte b_)
  3. byteToString(int b)
  4. byteToString(int b)
  5. byteToString(int b)
  6. byteToString(int n)
  7. byteToString(int n)
  8. byteToString(int val)