MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / encode

Method encode

src/main/java/core/packetproxy/common/Protobuf3.java:242–248  ·  view source on GitHub ↗
(String input)

Source from the content-addressed store, hash-verified

240 }
241
242 public static byte[] encode(String input) throws Exception {
243 ObjectMapper mapper = new ObjectMapper();
244 mapper.enable(JsonParser.Feature.STRICT_DUPLICATE_DETECTION);
245 HashMap<String, Object> messages = mapper.readValue(input, new TypeReference<HashMap<String, Object>>() {
246 });
247 return encodeData(messages);
248 }
249
250 public static boolean decodeData(ByteArrayInputStream data, Map<String, Object> messages) throws Exception {
251 int ordinary = 0;

Callers 14

testVarint150Method · 0.95
testStringMethod · 0.95
testLongMethod · 0.95
testVarintMinusMethod · 0.95
testComplexUnorderedMethod · 0.95
testComplexMethod · 0.95
testManyFieldMethod · 0.95

Calls 1

encodeDataMethod · 0.95

Tested by 8

testVarint150Method · 0.76
testStringMethod · 0.76
testLongMethod · 0.76
testVarintMinusMethod · 0.76
testComplexUnorderedMethod · 0.76
testComplexMethod · 0.76
testManyFieldMethod · 0.76