int value = 5;
ByteArrayOutputStream bout = new ByteArrayOutputStream();
bout.write(value);
byte[] array = bout.toByteArray();
とか。
エンディアンはどっちになるんだろう?