MCPcopy Create free account
hub / github.com/FongMi/TV / getStream

Method getStream

quickjs/src/main/java/com/fongmi/quickjs/crawler/Spider.java:237–245  ·  view source on GitHub ↗
(Object o, boolean base64)

Source from the content-addressed store, hash-verified

235 }
236
237 private ByteArrayInputStream getStream(Object o, boolean base64) {
238 if (o instanceof byte[]) {
239 return new ByteArrayInputStream((byte[]) o);
240 } else {
241 String content = o.toString();
242 if (base64 && content.contains("base64,")) content = content.split("base64,")[1];
243 return new ByteArrayInputStream(base64 ? Util.decode(content) : content.getBytes());
244 }
245 }
246}

Callers 1

proxy1Method · 0.95

Calls 4

decodeMethod · 0.95
splitMethod · 0.80
toStringMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected