/** * Returns a String that contains the binary value of a byte. * The returned value will always have 8 digits. */ static final public String binary(byte what) { return binary(what, 8); }
/** * Returns a String that contains the binary value of a byte. * The returned value will always have 8 digits. */ static final public String binary(byte value) { return binary(value, 8); }
/** * Returns a String that contains the binary value of a char. * The returned value will always have 16 digits because chars * are two bytes long. */ static final public String binary(char value) { return binary(value, 16); }
/** * Returns a String that contains the binary value of an int. The length * depends on the size of the number itself. If you want a specific number * of digits use binary(int what, int digits) to specify how many. */ static final public String binary(int value) { return binary(value, 32); }
/** * Returns a String that contains the binary value of a char. * The returned value will always have 16 digits because chars * are two bytes long. */ static final public String binary(char what) { return binary(what, 16); }
/** * Returns a String that contains the binary value of an int. The length * depends on the size of the number itself. If you want a specific number * of digits use binary(int what, int digits) to specify how many. */ static final public String binary(int what) { return binary(what, 32); }