MCPcopy Create free account
hub / github.com/ccxt/ccxt / binaryConcat

Method binaryConcat

java/lib/src/main/java/io/github/ccxt/base/Encode.java:160–175  ·  view source on GitHub ↗
(Object... parts)

Source from the content-addressed store, hash-verified

158 // ----------------------------
159
160 public static Object binaryConcat(Object... parts) {
161 ArrayList<Byte> out = new ArrayList<>();
162 for (Object part : parts) {
163 if (part instanceof String s) {
164 byte[] bytes = s.getBytes(StandardCharsets.US_ASCII);
165 for (byte b : bytes) out.add(b);
166 } else if (part instanceof byte[] arr) {
167 for (byte b : arr) out.add(b);
168 } else {
169 throw new IllegalArgumentException("BinaryConcat: Unsupported type, only String and byte[] are allowed.");
170 }
171 }
172 byte[] res = new byte[out.size()];
173 for (int i = 0; i < out.size(); i++) res[i] = out.get(i);
174 return res;
175 }
176
177 public static Object binaryConcatArray(Object arrays2) {
178 List<Object> arrays = (List<Object>) arrays2;

Callers 9

binaryConcatMethod · 0.95
hashMessageMethod · 0.45
orderMessageMethod · 0.45
encodeWithdrawMessageMethod · 0.45
hashOrderMessageMethod · 0.45
hashMessageMethod · 0.45
signMethod · 0.45
hashMessageMethod · 0.45
signTxEd25519Method · 0.45

Calls 2

addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected