src/main/java/net/sourceforge/jaad/aac/syntax/BitStream.java
@Override
    public int readBits(int n) throws AACException {
		int result;
		if(bitsCached>=n) {
			bitsCached -= n;
			result = (cache>>bitsCached)&maskBits(n);
			position += n;
		}
		else {
			position += n;
			final int c = cache&maskBits(bitsCached);
			final int left = n-bitsCached;
			cache = readCache(false);
			bitsCached = WORD_BITS-left;
			result = ((cache>>bitsCached)&maskBits(left))|(c<<left);
		}
		return result;
	}
@Override
    public int readBits(int n) throws AACException {
		int result;
		if(bitsCached>=n) {
			bitsCached -= n;
			result = (cache>>bitsCached)&maskBits(n);
			position += n;
		}
		else {
			position += n;
			final int c = cache&maskBits(bitsCached);
			final int left = n-bitsCached;
			cache = readCache(false);
			bitsCached = WORD_BITS-left;
			result = ((cache>>bitsCached)&maskBits(left))|(c<<left);
		}
		return result;
	}
@ Override public int readBits ( int n ) throws AACException { int result ; if ( bitsCached >= n ) { bitsCached -= n ; result = ( cache >> bitsCached ) & maskBits ( n ) ; position += n ; } else { position += n ; final int c = cache & maskBits ( bitsCached ) ; final int left = n - bitsCached ; cache = readCache ( false ) ; bitsCached = WORD_BITS - left ; result = ( ( cache >> bitsCached ) & maskBits ( left ) ) | ( c << left ) ; } return result ; }
/* (non-Javadoc)
@see net.sourceforge.jaad.aac.syntax.IBitStream#readBits(int)
/ * ( non - Javadoc )