Java OutputStream Write Int writeInt(OutputStream out, int value)

Here you can find the source of writeInt(OutputStream out, int value)

Description

write an integer to the output stream

License

Open Source License

Parameter

Parameter Description
out a parameter
value a parameter

Exception

Parameter Description
IOException an exception

Declaration

public static void writeInt(OutputStream out, int value) throws IOException 

Method Source Code

//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);
    }
}

Related

  1. writeInt(OutputStream out, int v)
  2. writeInt(OutputStream out, int v)
  3. writeInt(OutputStream out, int value)
  4. writeInt(OutputStream out, int value)
  5. writeInt(OutputStream out, int value)
  6. writeInt(OutputStream out, int x)
  7. writeInt(OutputStream out, int x)
  8. writeInt(OutputStream output, int value)
  9. writeInt(OutputStream outputStream, int integerToWrite)