private static byte [ ] readClass ( final InputStream is ) throws IOException { if ( is == null ) { throw new IOException ( "Class not found" ) ; } byte [ ] b = new byte [ is . available ( ) ] ; int len = 0 ; while ( true ) { int n = is . read ( b , len , b . length - len ) ; if ( n == - 1 ) { if ( len < b . length ) { byte [ ] c = new byte [ len ] ; System . arraycopy ( b , 0 , c , 0 , len ) ; b = c ; } return b ; } len += n ; if ( len == b . length ) { byte [ ] c = new byte [ b . length + 1000 ] ; System . arraycopy ( b , 0 , c , 0 , len ) ; b = c ; } } }
Reads the bytecode of a class .