Code example for File

Methods: length

0
    } 
  } 
 
  private byte[] loadClassData(String className) throws IOException{
    File f ;
    f = new File(className);
    int size = (int)f.length();
    byte buff[] = new byte[size];
    FileInputStream fis = new FileInputStream(f);
    DataInputStream dis = new DataInputStream(fis);
    dis.readFully(buff);
    dis.close();
    return buff;
  } 
 
  public static void printMethods(Method[] methods) {
    java.util.Arrays.sort(methods, MethodNameComparator);
    for (Method m : methods)
      System.out.println("\tMethod: " + m.getName());
  }