public int expectInt ( ) throws IOException { int b1 = in . read ( ) ; if ( b1 < 0 ) { throw new IOException ( "Missing byte 1 to expected int" ) ; } int b2 = in . read ( ) ; if ( b2 < 0 ) { throw new IOException ( "Missing byte 2 to expected int" ) ; } int b3 = in . read ( ) ; if ( b3 < 0 ) { throw new IOException ( "Missing byte 3 to expected int" ) ; } int b4 = in . read ( ) ; if ( b4 < 0 ) { throw new IOException ( "Missing byte 4 to expected int" ) ; } return unshift4bytes ( b1 , b2 , b3 , b4 ) ; }
Read an int from the input stream .