Java tutorial
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.OutputStream; public class Main { public static void writeUnsignedInt24(OutputStream out, int value) throws IOException { out.write((byte) (value >>> 16)); out.write((byte) (value >>> 8)); out.write((byte) value); } }