
com.extjs.gxt.ui.client.data.RpcMap_CustomFieldSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxt Show documentation
Show all versions of gxt Show documentation
Rich Internet Application Framework for GWT
/*
* Sencha GXT 2.3.0 - Sencha for GWT
* Copyright(c) 2007-2013, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.extjs.gxt.ui.client.data;
import java.util.Map.Entry;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.client.rpc.SerializationStreamReader;
import com.google.gwt.user.client.rpc.SerializationStreamWriter;
public final class RpcMap_CustomFieldSerializer {
public static void deserialize(SerializationStreamReader streamReader, RpcMap instance) throws SerializationException {
int size = streamReader.readInt();
for (int i = 0; i < size; ++i) {
String key = streamReader.readString();
Object value = streamReader.readObject();
instance.put(key, value);
}
}
public static void serialize(SerializationStreamWriter streamWriter, RpcMap instance) throws SerializationException {
int size = instance.size();
streamWriter.writeInt(size);
for (Entry entry : instance.entrySet()) {
streamWriter.writeString(entry.getKey());
streamWriter.writeObject(entry.getValue());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy