FileDocCategorySizeDatePackage
LineNumberTableAttribute.javaAPI DocphoneME MR2 API (J2ME)2507Wed May 02 17:59:48 BST 2007components

LineNumberTableAttribute

public class LineNumberTableAttribute extends Attribute

Fields Summary
public LineNumberTableEntry[]
data
Constructors Summary
public LineNumberTableAttribute(UnicodeConstant name, int l, LineNumberTableEntry[] d)

	super( name, l );
	data = d;
    
Methods Summary
public static AttributefinishReadAttribute(java.io.DataInput in, UnicodeConstant name)

	int l;
	int n;
	LineNumberTableEntry d[];

	l  = in.readInt();
	n  = in.readUnsignedShort();
	d = new LineNumberTableEntry[ n ];
	for ( int i = 0; i < n; i++ ){
	    d[i] = new LineNumberTableEntry( in.readUnsignedShort(), in.readUnsignedShort() );
	}
	return new LineNumberTableAttribute( name, l, d );
    
public static AttributereadAttribute(java.io.DataInput i, ConstantObject[] t)

	UnicodeConstant name;

	name = (UnicodeConstant)t[i.readUnsignedShort()];
	return finishReadAttribute( i, name );
    
protected intwriteData(java.io.DataOutput o)

	int n = data.length;
	o.writeShort( n );
	for ( int i = 0; i < n; i++ ){
	    data[i].write( o );
	}
	return 2+LineNumberTableEntry.size*n;