public static void saveClassBackup(String className,ClassLoader loader,byte[] classBytes) throws IOException {
  long t0=System.nanoTime();
  try {
    File bkpFile=getClassFile(className,loader);
    if (bkpFile.exists()) {
      throw new Profiler4JError("Backup file already exists: " + bkpFile);
    }
    Log.print(2,"saving backup " + bkpFile);
    FileOutputStream fos=new FileOutputStream(bkpFile);
    BufferedOutputStream bos=new BufferedOutputStream(fos);
    bos.write(classBytes);
    bos.close();
  }
  finally {
    long dt=System.nanoTime() - t0;
    totalWriteTime.addAndGet(dt);
  }
}

public static void saveClassBackup ( String className , ClassLoader loader , byte [ ] classBytes ) throws IOException { long t0 = System . nanoTime ( ) ; try { File bkpFile = getClassFile ( className , loader ) ; if ( bkpFile . exists ( ) ) { throw new Profiler4JError ( "Backup file already exists: " + bkpFile ) ; } Log . print ( 2 , "saving backup " + bkpFile ) ; FileOutputStream fos = new FileOutputStream ( bkpFile ) ; BufferedOutputStream bos = new BufferedOutputStream ( fos ) ; bos . write ( classBytes ) ; bos . close ( ) ; } finally { long dt = System . nanoTime ( ) - t0 ; totalWriteTime . addAndGet ( dt ) ; } }
saves the bytes of a given class in the backup directory .
