Java examples for java.io:OutputStream
write Unsigned Int to OutputStream
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { public static void writeUnsignedInt(OutputStream os, long intToWrite) throws IOException { // //from w ww . ja va 2 s .co m os.write((int) (intToWrite & 0xff)); os.write((int) ((intToWrite >> 8) & 0xff)); os.write((int) ((intToWrite >> 16) & 0xff)); os.write((int) ((intToWrite >> 24) & 0xff)); } }