Class ApiUtils
java.lang.Object
com.google.appengine.tools.development.ApiUtils
A class of utilities for working with API-related classes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TconvertBytesToPb(byte[] bytes, Class<T> messageClass) Convert the specified byte array to a protocol buffer representation of the specified type.static byte[]convertPbToBytes(Object object) Convert the protocol buffer representation to a byte array.static boolean
-
Method Details
-
convertBytesToPb
public static <T> T convertBytesToPb(byte[] bytes, Class<T> messageClass) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException Convert the specified byte array to a protocol buffer representation of the specified type. This type can either be a subclass ofProtocolMessage(a legacy protocol buffer implementation), orMessage(the open-sourced protocol buffer implementation). -
convertPbToBytes
Convert the protocol buffer representation to a byte array. The object can either be an instance ofProtocolMessage(a legacy protocol buffer implementation), orMessage(the open-sourced protocol buffer implementation). -
isPromotingYaml
public static boolean isPromotingYaml()
-