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("TestFloat1144335049");
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.x = new float[count];
        for(int f = 0; f < count; f++) {
            this.x[f] = dis.readFloat();
        }
    }
    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.x == null) {
        fos.writeByte(1);
    }
    else {
        fos.writeByte(0);
        int count = this.x.length;
        fos.writeInt(count);
        for(int g = 0; g < count; g++) {
            fos.writeFloat(this.x[g]);
        }
    }
    fos.flush();
    return fos.toByteArray();
}
public void __delete() throws java.lang.Exception {
}
New to GrepCode? Check out our FAQ X