| 1 26 package com.yworks.yguard.obf.classfile; 27 28 import java.io.*; 29 import java.util.*; 30 31 36 public class ExceptionsAttrInfo extends AttrInfo 37 { 38 40 41 private int u2numberOfExceptions; 43 private int[] u2exceptionIndexTable; 44 45 46 48 49 protected ExceptionsAttrInfo(ClassFile cf, int attrNameIndex, int attrLength) 51 { 52 super(cf, attrNameIndex, attrLength); 53 } 54 55 56 protected String getAttrName() 57 { 58 return ATTR_Exceptions; 59 } 60 61 62 protected void readInfo(DataInput din) throws java.io.IOException  63 { 64 u2numberOfExceptions = din.readUnsignedShort(); 65 u2exceptionIndexTable = new int[u2numberOfExceptions]; 66 for (int i = 0; i < u2numberOfExceptions; i++) 67 { 68 u2exceptionIndexTable[i] = din.readUnsignedShort(); 69 } 70 } 71 72 73 public void writeInfo(DataOutput dout) throws java.io.IOException  74 { 75 dout.writeShort(u2numberOfExceptions); 76 for (int i = 0; i < u2numberOfExceptions; i++) 77 { 78 dout.writeShort(u2exceptionIndexTable[i]); 79 } 80 } 81 } 82 83 | Popular Tags |