MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / getBytes

Method getBytes

src/main/java/wycc/util/TextFile.java:38–46  ·  view source on GitHub ↗
(Charset encoding)

Source from the content-addressed store, hash-verified

36 }
37
38 public byte[] getBytes(Charset encoding) throws IOException {
39 try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); PrintStream pout = new PrintStream(bout);) {
40 for (String line : lines) {
41 pout.println(line);
42 }
43 pout.flush();
44 return bout.toByteArray();
45 }
46 }
47
48 @Override
49 public Iterator<String> iterator() {

Callers 5

mirrorMethod · 0.95
parseUnicodeStringMethod · 0.80
fromStringMethod · 0.80
IdentifierMethod · 0.80
UTF8Method · 0.80

Calls 3

printlnMethod · 0.80
flushMethod · 0.80
toByteArrayMethod · 0.80

Tested by 2

mirrorMethod · 0.76
fromStringMethod · 0.64