code: public void scanClass(InputStream bits) throws IOException {
          DataInputStream dstream = new DataInputStream(new BufferedInputStream(bits));
          ClassFile cf = null;
          try {
              cf = new ClassFile(dstream);
              classIndex.put(cf.getName(), new HashSet<String>());
              if (scanClassAnnotations)
                  scanClass(cf);
              if (scanMethodAnnotations || scanParameterAnnotations)
                  scanMethods(cf);
              if (scanFieldAnnotations)
                  scanFields(cf);
              // create an index of interfaces the class implements
              if (cf.getInterfaces() != null) {
                  Set<String> intfs = new HashSet<String>();
                  for (String intf : cf.getInterfaces())
                      intfs.add(intf);
                  implementsIndex.put(cf.getName(), intfs);
              }
          } finally {
              dstream.close();
              bits.close();
          }
      }
docs: Parse a .class file for annotations
  
  @param bits
  input stream pointing to .class file bits
  @throws IOException