Java tutorial
//package com.java2s; import java.io.InputStream; import java.io.IOException; public class Main { public static final int Read1(InputStream in) { try { return ((int) in.read() & 0xff); } catch (IOException e) { return -1; } } }