public static int readInt2(InputStream is){
  try {
    int b1=is.read();
    int b2=is.read();
    if (b1 == -1 || b2 == -1)     return -1;
    return (b1 << 8) | b2;
  }
 catch (  IOException e) {
    throw new PngjInputException("error reading Int2",e);
  }
}

public static int readInt2 ( InputStream is ) { try { int b1 = is . read ( ) ; int b2 = is . read ( ) ; if ( b1 == - 1 || b2 == - 1 ) return - 1 ; return ( b1 << 8 ) | b2 ; } catch ( IOException e ) { throw new PngjInputException ( "error reading Int2" , e ) ; } }
- 1 if eof png uses " network byte order "
