IceMX.StringIntDictHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ice-compat Show documentation
Show all versions of ice-compat Show documentation
Ice is a comprehensive RPC framework that helps you build distributed applications with minimal effort using familiar object-oriented idioms
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.5
//
//
//
// Generated from file `Metrics.ice'
//
// Warning: do not edit this file.
//
//
//
package IceMX;
public final class StringIntDictHelper
{
public static void
write(Ice.OutputStream ostr, java.util.Map v)
{
if(v == null)
{
ostr.writeSize(0);
}
else
{
ostr.writeSize(v.size());
for(java.util.Map.Entry e : v.entrySet())
{
ostr.writeString(e.getKey());
ostr.writeInt(e.getValue());
}
}
}
public static java.util.Map
read(Ice.InputStream istr)
{
java.util.Map v;
v = new java.util.HashMap();
int sz0 = istr.readSize();
for(int i0 = 0; i0 < sz0; i0++)
{
String key;
key = istr.readString();
int value;
value = istr.readInt();
v.put(key, value);
}
return v;
}
}