Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
public int __id = -1;
private final static net.sourceforge.floggy.persistence.impl.PersistableMetadata __persistableMetadata = new net.sourceforge.floggy.persistence.impl.PersistableMetadata("PersonArray264188287");
public int __getId() {
    return __id;
}
public void __setId(int id) {
    this.__id= id;
}
public net.sourceforge.floggy.persistence.impl.PersistableMetadata __getPersistableMetadata() {
    return __persistableMetadata;
}
public String getRecordStoreName() {
    return __persistableMetadata.getRecordStoreName();
}
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 y = 0; y < count; y++) {
            this.age[y] = dis.readInt();
        }
    }
    else {
        age = null;
    }
    if(dis.readByte() == 0) {
        int count = dis.readInt();
        this.name = new java.lang.String[count];
        for(int a = 0; a < count; a++) {
            this.name[a]= 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 b = 0; b < count; b++) {
            this.x[b]= (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 c = 0; c < count; c++) {
            fos.writeInt(this.age[c]);
        }
    }
    if(this.name == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.name.length;
        fos.writeInt(count);
        for(int d = 0; d < count; d++) {
            net.sourceforge.floggy.persistence.impl.SerializationHelper.writeString(fos, name[d]);
        }
    }
    if(this.x == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.x.length;
        fos.writeInt(count);
        for(int e = 0; e < count; e++) {
            net.sourceforge.floggy.persistence.impl.SerializationHelper.writePersistable(fos, "net.sourceforge.floggy.persistence.beans.animals.Bird", x[e]);
        }
    }
    fos.flush();
    return fos.toByteArray();
}
public void __delete() throws java.lang.Exception {
}
New to GrepCode? Check out our FAQ X