private int readIntLittleEndianPaddedOnBitWidth ( ) throws IOException { switch ( bytesWidth ) { case 0 : return 0 ; case 1 : return in . read ( ) ; case 2 : { int ch2 = in . read ( ) ; int ch1 = in . read ( ) ; return ( ch1 << 8 ) + ch2 ; } case 3 : { int ch3 = in . read ( ) ; int ch2 = in . read ( ) ; int ch1 = in . read ( ) ; return ( ch1 << 16 ) + ( ch2 << 8 ) + ( ch3 << 0 ) ; } case 4 : { return readIntLittleEndian ( ) ; } } throw new RuntimeException ( "Unreachable" ) ; }
Reads the next byteWidth little endian int .