fullRuntime/src/sc/util/zip/ZipUtil.java
public static byte unsignedIntToSignedByte(int i) {
        if (i > 255 || i < 0) {
            throw new IllegalArgumentException("Can only convert non-negative integers between [0,255] to byte: [" + i + "]");
        }
        if (i < 128) {
            return (byte) i;
        } else {
            return (byte) (i - 256);
        }
    }
/**
     * Converts an unsigned integer to a signed byte (e.g., 255 becomes -1).
     *
     * @param i integer to convert to byte
     * @return byte representation of the provided int
     * @throws IllegalArgumentException if the provided integer is not inside the range [0,255].
     * @since 1.5
     */
Converts an unsigned integer to a signed byte .
@param i integer to convert to byte
@return byte representation of the provided int
@throws IllegalArgumentException if the provided integer is not inside the range [0,255].
Converts an unsigned integer to a signed byte . @param i integer to convert to byte @return byte representation of the provided int @throws IllegalArgumentException if the provided integer is not inside the range [ 0 255 ] .
public static byte unsignedIntToSignedByte(int i) {
        if (i > 255 || i < 0) {
            throw new IllegalArgumentException("Can only convert non-negative integers between [0,255] to byte: [" + i + "]");
        }
        if (i < 128) {
            return (byte) i;
        } else {
            return (byte) (i - 256);
        }
    }
public static byte unsignedIntToSignedByte ( int i ) { if ( i > 255 || i < 0 ) { throw new IllegalArgumentException ( "Can only convert non-negative integers between [0,255] to byte: [" + i + "]" ) ; } if ( i < 128 ) { return ( byte ) i ; } else { return ( byte ) ( i - 256 ) ; } }
Converts an unsigned integer to a signed byte (e.g., 255 becomes -1).
Converts an unsigned integer to a signed byte ( e . g . 255 becomes - 1 ) .