// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name: TList.java
package hep.rootio.reps;
import hep.rootio.RootInput;
import hep.rootio.RootObjectRepresentation;
import hep.rootio.implementation.AbstractRootObject;
import hep.rootio.implementation.SpecificRootObject;
import java.io.DataInput;
import java.io.IOException;
import java.util.AbstractList;
public class TList extends SpecificRootObject
{
public TList()
{
}
public void read(RootInput in)
throws IOException
{
int v = in.readVersion(this);
if(v > 2)
in.readObject("TObject");
if(v > 1)
put("fName", in.readObject("TString"));
int n = in.readInt();
put("fSize", n);
array = new RootObjectRepresentation[n];
for(int i = 0; i < n; i++)
{
RootObjectRepresentation obj = in.readObjectRef();
if(v > 3)
{
int l = in.readByte();
if(l > 0)
{
byte data[] = new byte[l];
for(int j = 0; j < l;)
{
data[j] = in.readByte();
i++;
}
String opt = new String(data);
} else
{
array[i] = obj;
}
} else
{
array[i] = obj;
}
}
put("fArray", array);
in.checkLength(this);
}
protected Object createProxy()
{
Object proxy = new AbstractList() {
public int size()
{
return array.length;
}
public Object get(int index)
{
return array[index] != null ? array[index].getProxy() : null;
}
};
return proxy;
}
public static String getJavaType()
{
return "java.util.List";
}
private RootObjectRepresentation array[];
}
Ads help maintain this website.