Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static Byte bytesToInt8(byte bytes[]) {

        Integer value = 0;

        for (int i = 0; (i < 1 && i < bytes.length); ++i) {
            value = value | ((bytes[i] & 0x000000FF) << 8 * i);
        }

        return value.byteValue();
    }
}