// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

public class Union {
    public static void main(String[] args) {
        byte[] b = { 0, 0, 0, 123, 66, -10, -23, 121 };
        try {
            ByteArrayInputStream ba = new ByteArrayInputStream(b);
            DataInputStream dis = new DataInputStream(ba);
            System.out.println(dis.readInt());
            System.out.println(dis.readFloat());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
