Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Converts a byte to an int, preserving the sign.
     *
     * For example, FF will be converted to 255 and not -1.
     *
     * @param bite the bite
     * @return the int from byte
     */
    public static int getIntFromByte(final byte bite) {
        return Integer.valueOf(bite & 0xFF);
    }
}