MCPcopy Create free account
hub / github.com/M66B/FairEmail / readBytes

Method readBytes

app/src/main/java/eu/faircode/email/Helper.java:3082–3088  ·  view source on GitHub ↗
(InputStream is)

Source from the content-addressed store, hash-verified

3080 }
3081
3082 static byte[] readBytes(InputStream is) throws IOException {
3083 ByteArrayOutputStream os = new ByteArrayOutputStream(Math.max(BUFFER_SIZE, is.available()));
3084 byte[] buffer = new byte[BUFFER_SIZE];
3085 for (int len = is.read(buffer); len != -1; len = is.read(buffer))
3086 os.write(buffer, 0, len);
3087 return os.toByteArray();
3088 }
3089
3090 public static String readLine(InputStream is, Charset charset) throws IOException {
3091 ByteArrayOutputStream bos = new ByteArrayOutputStream();

Callers 3

getDataUriMethod · 0.95
decompressMethod · 0.95
onExecuteMethod · 0.95

Calls 4

maxMethod · 0.80
availableMethod · 0.45
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected