Java InputStream to Int getRGBInt(InputStream in)

Here you can find the source of getRGBInt(InputStream in)

Description

get RGB Int

License

Open Source License

Declaration

public static int getRGBInt(InputStream in) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;
import java.io.InputStream;

public class Main {
    public static int getRGBInt(InputStream in) throws IOException {
        int b = (in.read() & 0xff) << 16;
        int g = (in.read() & 0xff) << 8;
        int r = (in.read() & 0xff) << 0;

        return b | g | r;
    }// ww w  .jav a  2s.co m
}