public class ProtoUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String[] |
EMPTY |
protected static int |
HASHTABLE_KEY |
protected static int |
HASHTABLE_VALUE |
protected static int |
KEY_VALUE |
protected static java.lang.String |
unknown |
protected static int |
VECTOR_ELEMENT |
| Constructor and Description |
|---|
ProtoUtil() |
| Modifier and Type | Method and Description |
|---|---|
int |
computeAnonymousObjectSize(java.lang.Object obj) |
protected int |
computeByteArraySize(java.lang.Object obj)
Needed for ProtoFileUtil
|
protected int |
computeHashtableSize(java.lang.Object map) |
protected int |
computeObjectSize(java.lang.Object obj,
int type) |
protected int |
computeVectorSize(java.lang.Object list) |
protected java.lang.Object |
decodeAnonymousObject(CodedInputStream in2) |
protected java.util.Hashtable |
decodeHashtable(CodedInputStream in2) |
protected java.lang.Object |
decodeObject(CodedInputStream in2,
int type) |
protected java.util.Vector |
decodeVector(CodedInputStream in2) |
protected void |
encodeAnonymousObject(CodedOutputStream out,
java.lang.Object obj) |
protected void |
encodeByteArray(CodedOutputStream out,
java.lang.Object obj)
Needed for ProtoFileUtil
|
protected void |
encodeHashtable(CodedOutputStream out,
java.lang.Object map) |
protected void |
encodeObject(CodedOutputStream out,
java.lang.Object obj,
int type) |
protected void |
encodeVector(CodedOutputStream out,
java.lang.Object list) |
protected java.lang.Object |
getObjectId(java.lang.Object object) |
protected int |
getObjectTypeEnum(java.lang.Object obj) |
protected java.lang.Object |
getObjetById(java.lang.Object id,
java.lang.Class clas) |
static boolean |
hashtableIsMessage(java.util.Hashtable hash,
java.lang.String[] required,
java.lang.String[] optional) |
java.lang.Object |
load(java.io.InputStream in,
int size) |
int |
save(java.io.OutputStream out,
java.lang.Object obj) |
protected static final java.lang.String[] EMPTY
protected static final java.lang.String unknown
protected static final int VECTOR_ELEMENT
protected static final int KEY_VALUE
protected static final int HASHTABLE_KEY
protected static final int HASHTABLE_VALUE
public int save(java.io.OutputStream out,
java.lang.Object obj)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object load(java.io.InputStream in,
int size)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object decodeAnonymousObject(CodedInputStream in2) throws java.io.IOException
java.io.IOExceptionprotected java.lang.Object decodeObject(CodedInputStream in2, int type) throws java.io.IOException
java.io.IOExceptionprotected java.util.Vector decodeVector(CodedInputStream in2) throws java.io.IOException
java.io.IOExceptionprotected java.util.Hashtable decodeHashtable(CodedInputStream in2) throws java.io.IOException
java.io.IOExceptionprotected int computeObjectSize(java.lang.Object obj,
int type)
protected void encodeObject(CodedOutputStream out, java.lang.Object obj, int type) throws java.io.IOException
java.io.IOExceptionprotected int computeByteArraySize(java.lang.Object obj)
protected void encodeByteArray(CodedOutputStream out, java.lang.Object obj) throws java.io.IOException
java.io.IOExceptionpublic int computeAnonymousObjectSize(java.lang.Object obj)
protected void encodeAnonymousObject(CodedOutputStream out, java.lang.Object obj) throws java.io.IOException
java.io.IOExceptionprotected int computeVectorSize(java.lang.Object list)
protected int computeHashtableSize(java.lang.Object map)
protected void encodeVector(CodedOutputStream out, java.lang.Object list) throws java.io.IOException
java.io.IOExceptionprotected void encodeHashtable(CodedOutputStream out, java.lang.Object map) throws java.io.IOException
java.io.IOExceptionprotected int getObjectTypeEnum(java.lang.Object obj)
public static boolean hashtableIsMessage(java.util.Hashtable hash,
java.lang.String[] required,
java.lang.String[] optional)
protected java.lang.Object getObjetById(java.lang.Object id,
java.lang.Class clas)
protected java.lang.Object getObjectId(java.lang.Object object)