Here you can find the source of getRGBInt(InputStream in)
public static int getRGBInt(InputStream in) throws IOException
//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 }