Here you can find the source of writeInt(OutputStream out, int value)
Parameter | Description |
---|---|
out | a parameter |
value | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static void writeInt(OutputStream out, int value) throws IOException
//package com.java2s; import java.io.IOException; import java.io.OutputStream; public class Main { /**//from w w w . ja v a 2s. c om * write an integer to the output stream * * @param out * @param value * @throws IOException */ public static void writeInt(OutputStream out, int value) throws IOException { out.write((value >>> 24) & 0xFF); out.write((value >>> 16) & 0xFF); out.write((value >>> 8) & 0xFF); out.write((value >>> 0) & 0xFF); } }