1 16 17 package org.cojen.classfile.attribute; 18 19 import java.io.DataInput ; 20 import java.io.DataOutput ; 21 import java.io.IOException ; 22 import org.cojen.classfile.Attribute; 23 import org.cojen.classfile.ConstantPool; 24 25 30 public class UnknownAttr extends Attribute { 31 private final byte[] mData; 32 33 public UnknownAttr(ConstantPool cp, String name, byte[] data) { 34 super(cp, name); 35 mData = (byte[]) data.clone(); 36 } 37 38 public UnknownAttr(ConstantPool cp, String name, int length, DataInput din) 39 throws IOException 40 { 41 super(cp, name); 42 mData = new byte[length]; 43 din.readFully(mData); 44 } 45 46 public int getLength() { 47 return mData.length; 48 } 49 50 public void writeDataTo(DataOutput dout) throws IOException { 51 dout.write(mData); 52 } 53 } 54 | Popular Tags |