Methods Summary |
---|
public static Attribute | finishReadAttribute(java.io.DataInput i, UnicodeConstant name)
int l;
byte d[];
l = i.readInt();
d = new byte[ l ];
i.readFully( d );
return new UninterpretedAttribute( name, l, d );
|
public int | getInt(int w)
return ( (int)data[w] << 24 ) |
(( (int)data[w+1] &0xff ) << 16 ) |
(( (int)data[w+2] &0xff ) << 8 ) |
( (int)data[w+3] &0xff );
|
public int | getUnsignedShort(int w)
return (( (int)data[w] &0xff ) << 8 ) | ( (int)data[w+1] &0xff );
|
private void | putShort(int w, short v)
data[w] = (byte)(v>>>8);
data[w+1] = (byte)v;
|
public static components.UninterpretedAttribute | readAttribute(java.io.DataInput i, ConstantObject[] globals)
UnicodeConstant name;
int l;
byte d[];
name = (UnicodeConstant)globals[i.readUnsignedShort()];
l = i.readInt();
d = new byte[ l ];
i.readFully( d );
return new UninterpretedAttribute( name, l, d );
|
public static Attribute[] | readAttributes(java.io.DataInput i, ConstantObject[] t, boolean verbose)
int nattr = i.readUnsignedShort();
if ( verbose ){
System.out.println(Localizer.getString("uninterpretedattribute.reading_attributes", Integer.toString(nattr)));
}
if ( nattr == 0 ) return null;
Attribute a[] = new Attribute[nattr];
for ( int j = 0; j < nattr; j++ ){
a[j] = readAttribute( i, t );
}
return a;
|
protected int | writeData(java.io.DataOutput o)
int trueLength = 0;
o.write( data, 0, data.length );
return data.length;
|