Code example for DataInputStream

Methods: close, readFully

0
    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());
  } 
 
  public static void printInterfaces(Class[] clses) {
    System.out.println("There are " + clses.length + " interfaces!");
    java.util.Arrays.sort(clses, ClassNameComparator);
    for (Class cls : clses) {