From 1742190f784d0d62e7cc869eebafdfe1927e448f Mon Sep 17 00:00:00 2001 From: lclc98 Date: Sat, 2 Jul 2016 21:57:31 +1000 Subject: Removed unused methods --- src/main/java/cuchaz/enigma/Util.java | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/main/java/cuchaz/enigma/Util.java') diff --git a/src/main/java/cuchaz/enigma/Util.java b/src/main/java/cuchaz/enigma/Util.java index 1bcdb9e..9445b2b 100644 --- a/src/main/java/cuchaz/enigma/Util.java +++ b/src/main/java/cuchaz/enigma/Util.java @@ -41,27 +41,6 @@ public class Util { return result; } - public static void closeQuietly(Closeable closeable) { - if (closeable != null) { - try { - closeable.close(); - } catch (IOException ex) { - // just ignore any further exceptions - } - } - } - - public static void closeQuietly(JarFile jarFile) { - // silly library should implement Closeable... - if (jarFile != null) { - try { - jarFile.close(); - } catch (IOException ex) { - // just ignore any further exceptions - } - } - } - public static String readStreamToString(InputStream in) throws IOException { return CharStreams.toString(new InputStreamReader(in, "UTF-8")); } @@ -86,14 +65,4 @@ public class Util { } } } - - public static void writeClass(CtClass c) { - String name = Descriptor.toJavaName(c.getName()); - File file = new File(name + ".class"); - try (FileOutputStream out = new FileOutputStream(file)) { - out.write(c.toBytecode()); - } catch (IOException | CannotCompileException ex) { - throw new Error(ex); - } - } } -- cgit v1.2.3