Skip to content

Instantly share code, notes, and snippets.

nick iobee

  • china
Block or report user

Report or block iobee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@iobee
iobee / testJavaWriteFilePerformance.java
Created Dec 11, 2017
testJavaWriteFilePerformance
View testJavaWriteFilePerformance.java
char[] chars = new char[100*1024*1024];
Arrays.fill(chars, 'A');
String text = new String(chars);
long start = System.nanoTime();
BufferedWriter bw = new BufferedWriter(new FileWriter("/tmp/a.txt"));
bw.write(text);
bw.close();
long time = System.nanoTime() - start;
System.out.println("Wrote " + chars.length*1000L/time+" MB/s.");
View ClassLocationUtils.java
package com.ridge.util;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.CodeSource;
import java.security.ProtectionDomain;
/**
* @author : chenxh
You can’t perform that action at this time.