Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.io.ByteArrayOutputStream;

public class Main {
    public static byte[] concatByteArrays(byte[] a, byte[] b) {
        try {
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            outputStream.write(a);
            outputStream.write(b);
            return outputStream.toByteArray();
        } catch (Exception e) {
            return null;
        }
    }
}