code: @Override
  	public int read() throws IOException {
  		byte[] b = new byte[1];
  		int num = read(b);
  		if(num == 0) {
  			throw new IllegalStateException("read returned 0");
  		}
  		return num > 0 ? b[0] : -1;
  	}
docs: InputStream Contract