Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class Main {
    public static void main(String[] args) throws IOException {

        byte[] bs = { 65, 66, 67, 68, 69, 70, 71, 72 };

        OutputStream os = new ByteArrayOutputStream();

        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        baos.write(bs);

        baos.writeTo(os);

        System.out.println(os.toString());

    }
}