GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Java/compilestandard.java at master · javaarchive/Java
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
Expand file tree/ Copy pathcompilestandard.javaMore file actions 57 lines (50 loc) · 1.64 KB / Copy pathcompilestandard.javaFile metadata and controls57 lines (50 loc) · 1.64 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 import java.io.*; import java.security.MessageDigest; import java.security.*; public class compilestandard extends usacotools { public static String sha256(String input) throws NoSuchAlgorithmException { MessageDigest mDigest = MessageDigest.getInstance("SHA-256"); byte[] result = mDigest.digest(input.getBytes()); StringBuffer sb = new StringBuffer(); for (int i = 0; i < result.length; i++) { sb.append(Integer.toString((result[i] & 0xff) + 0x100, 16).substring(1)); } return sb.toString(); } public static void main(String[] args) throws IOException{ // TODO Auto-generated method stub BufferedReader f; if(args.length==1) { if(args[0].equals("eclipse")) { f=mreader("src/usacotools.java"); }else { f=mreader("usacotools.java"); } }else { f=mreader("usacotools.java"); } print("build"); String st; String full=""; while ((st = f.readLine()) != null) { full=full+st+"\n"; } String text=full.replace("if(!(lock)) {return null;}", ""); text=text.replace("public abstract class usacotools","public abstract class utools"); print(text); PrintWriter pw=mwriter("utools.java"); if(args[0].equals("eclipse")) { pw=mwriter("src/utools.java"); }else { } pw.println(text); pw.close(); print("utools.java is the one you should copy into your code but usacotools is the one you should extend"); try{ print("utools.java SHA256: "+sha256(text)); print("usacotools.java SHA256: "+sha256(full)); }catch(Exception e) { e.printStackTrace(); } } } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |