From 2df49d32a71818227e80a8628688906f2ede8a6a Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 2 Sep 2014 20:56:03 +0400 Subject: java-decompiler: fixes and cleanups - unified attribute loading code - common methods for checking member flags - verifying skip() - correct resource closing - typos --- .../struct/attr/StructExceptionsAttribute.java | 27 ---------------------- 1 file changed, 27 deletions(-) (limited to 'src/org/jetbrains/java/decompiler/struct/attr/StructExceptionsAttribute.java') diff --git a/src/org/jetbrains/java/decompiler/struct/attr/StructExceptionsAttribute.java b/src/org/jetbrains/java/decompiler/struct/attr/StructExceptionsAttribute.java index c52fcc7..53c02ec 100644 --- a/src/org/jetbrains/java/decompiler/struct/attr/StructExceptionsAttribute.java +++ b/src/org/jetbrains/java/decompiler/struct/attr/StructExceptionsAttribute.java @@ -17,9 +17,6 @@ package org.jetbrains.java.decompiler.struct.attr; import org.jetbrains.java.decompiler.struct.consts.ConstantPool; -import java.io.ByteArrayOutputStream; -import java.io.DataOutputStream; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -38,30 +35,6 @@ public class StructExceptionsAttribute extends StructGeneralAttribute { } } - public void writeToStream(DataOutputStream out) throws IOException { - - out.writeShort(attribute_name_index); - - ByteArrayOutputStream codeout = new ByteArrayOutputStream(); - DataOutputStream dataout = new DataOutputStream(codeout); - - int len = throwsExceptions.size(); - dataout.writeShort(len); - - if (len > 0) { - info = new byte[len * 2]; - for (int i = 0, j = 0; i < len; i++, j += 2) { - int index = throwsExceptions.get(i).intValue(); - info[j] = (byte)(index >> 8); - info[j + 1] = (byte)(index & 0xFF); - } - dataout.write(info); - } - - out.writeInt(codeout.size()); - out.write(codeout.toByteArray()); - } - public String getExcClassname(int index, ConstantPool pool) { return pool.getPrimitiveConstant(throwsExceptions.get(index).intValue()).getString(); } -- cgit v1.2.3