MCPcopy Create free account
hub / github.com/Giyn/LiveChat / errorPack

Method errorPack

src/pers/giyn/LiveChat/server/utils/Utils.java:243–252  ·  view source on GitHub ↗
(byte subStatus, String msg)

Source from the content-addressed store, hash-verified

241 }
242
243 public static byte[] errorPack(byte subStatus, String msg) {
244 byte[] data = ("xxaaaa" + msg).getBytes(StandardCharsets.UTF_8);
245 data[0] = 4;
246 data[1] = subStatus;
247 byte[] size = Convertion.int2Bytes(msg.getBytes(StandardCharsets.UTF_8).length);
248
249 System.arraycopy(size, 0, data, 2, 4);
250
251 return data;
252 }
253
254 public static byte[] loginSuccessPack(String publicKey, String privateKey) {
255

Callers 2

processMethod · 0.80
completedMethod · 0.80

Calls 1

int2BytesMethod · 0.95

Tested by

no test coverage detected