private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(classBytes); BufferedInputStream bis = new BufferedInputStream(bais); ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader()); ClassReader cr = new ClassReader(bis); cr.accept(cw, 0); return cw.toByteArray(); }
private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(classBytes); BufferedInputStream bis = new BufferedInputStream(bais); ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader()); ClassReader cr = new ClassReader(bis); cr.accept(cw, 0); return cw.toByteArray(); }
private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(classBytes); BufferedInputStream bis = new BufferedInputStream(bais); ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader()); ClassReader cr = new ClassReader(bis); cr.accept(cw, 0); return cw.toByteArray(); }
private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(classBytes); BufferedInputStream bis = new BufferedInputStream(bais); ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader()); ClassReader cr = new ClassReader(bis); cr.accept(cw, 0); return cw.toByteArray(); }
private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(classBytes); BufferedInputStream bis = new BufferedInputStream(bais); ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader()); ClassReader cr = new ClassReader(bis); cr.accept(cw, 0); return cw.toByteArray(); }