Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte[] truncByteArray(byte[] array, int size) {
        if (size <= array.length) {
            byte[] output = new byte[size];
            System.arraycopy(array, 0, output, 0, size);
            return output;
        }
        return array;
    }
}