public long expectLong ( ) throws IOException { int b1 = in . read ( ) ; if ( b1 < 0 ) { throw new IOException ( "Missing byte 1 to expected long" ) ; } int b2 = in . read ( ) ; if ( b2 < 0 ) { throw new IOException ( "Missing byte 2 to expected long" ) ; } int b3 = in . read ( ) ; if ( b3 < 0 ) { throw new IOException ( "Missing byte 3 to expected long" ) ; } long b4 = in . read ( ) ; if ( b4 < 0 ) { throw new IOException ( "Missing byte 4 to expected long" ) ; } long b5 = in . read ( ) ; if ( b5 < 0 ) { throw new IOException ( "Missing byte 5 to expected long" ) ; } long b6 = in . read ( ) ; if ( b6 < 0 ) { throw new IOException ( "Missing byte 6 to expected long" ) ; } long b7 = in . read ( ) ; if ( b7 < 0 ) { throw new IOException ( "Missing byte 7 to expected long" ) ; } long b8 = in . read ( ) ; if ( b8 < 0 ) { throw new IOException ( "Missing byte 8 to expected long" ) ; } return unshift8bytes ( b1 , b2 , b3 , b4 , b5 , b6 , b7 , b8 ) ; }
Read a long int from the input stream .