Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
public int __id = -1;
public int __getId() {
    return __id;
}
public void __setId(int id) {
    this.__id= id;
}
public String getRecordStoreName() {
    return "PersonArray264188287";
}
public void __deserialize(byte[] buffer, boolean lazy) throws java.lang.Exception {
    java.io.DataInputStream dis = new java.io.DataInputStream(new java.io.ByteArrayInputStream(buffer));
    if(dis.readByte() == 0) {
        int count = dis.readInt();
        this.age = new int[count];
        for(int _202 = 0; _202 < count; _202++) {
            this.age[_202] = dis.readInt();
        }
    }
    else {
        age = null;
    }
    if(dis.readByte() == 0) {
        int count = dis.readInt();
        this.name = new java.lang.String[count];
        for(int _185 = 0; _185 < count; _185++) {
            this.name[_185]= net.sourceforge.floggy.persistence.impl.SerializationHelper.readString(dis);
        }
    }
    else {
        name = null;
    }
    if(dis.readByte() == 0) {
        int count = dis.readInt();
        this.x = new net.sourceforge.floggy.persistence.beans.animals.Bird[count];
        for(int _189 = 0; _189 < count; _189++) {
            this.x[_189]= (net.sourceforge.floggy.persistence.beans.animals.Bird)net.sourceforge.floggy.persistence.impl.SerializationHelper.readPersistable(dis, new net.sourceforge.floggy.persistence.beans.animals.Bird(), lazy);
        }
    }
    else {
        x = null;
    }
    dis.close();
}
public byte[] __serialize() throws java.lang.Exception {
    net.sourceforge.floggy.persistence.impl.FloggyOutputStream fos= new net.sourceforge.floggy.persistence.impl.FloggyOutputStream();
    if(this.age == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.age.length;
        fos.writeInt(count);
        for(int _83 = 0; _83 < count; _83++) {
            fos.writeInt(this.age[_83]);
        }
    }
    if(this.name == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.name.length;
        fos.writeInt(count);
        for(int _106 = 0; _106 < count; _106++) {
            net.sourceforge.floggy.persistence.impl.SerializationHelper.writeString(fos, name[_106]);
        }
    }
    if(this.x == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.x.length;
        fos.writeInt(count);
        for(int _156 = 0; _156 < count; _156++) {
            net.sourceforge.floggy.persistence.impl.SerializationHelper.writePersistable(fos, "net.sourceforge.floggy.persistence.beans.animals.Bird", x[_156]);
        }
    }
    fos.flush();
    return fos.toByteArray();
}
public void __delete() throws java.lang.Exception {
    this.delete();
}
New to GrepCode? Check out our FAQ X