@Test public void testParseList() { checkParse(Arrays.<Object>asList(), "le"); checkParse(Arrays.<Object>asList(-6L), "li-6ee"); checkParse(Arrays.<Object>asList("00", 55L), "l2:00i55ee"); checkParse(Arrays.<Object>asList(Arrays.<Object>asList(), Arrays.<Object>asList()), "llelee"); }
private Object parseList() throws IOException { List<Object> result = new ArrayList<>(); while (true) { byte b = readByte(); if (b == 'e') break; result.add(parseValue(b)); } return result; }
Bencode { private Object parseList() throws IOException { List<Object> result = new ArrayList<>(); while (true) { byte b = readByte(); if (b == 'e') break; result.add(parseValue(b)); } return result; } }
Bencode { private Object parseList() throws IOException { List<Object> result = new ArrayList<>(); while (true) { byte b = readByte(); if (b == 'e') break; result.add(parseValue(b)); } return result; } private  Bencode(InputStream in); }
Bencode { private Object parseList() throws IOException { List<Object> result = new ArrayList<>(); while (true) { byte b = readByte(); if (b == 'e') break; result.add(parseValue(b)); } return result; } private  Bencode(InputStream in); static void serialize(Object obj, OutputStream out); static Object parse(InputStream in); static byte[] byteStringToArray(String str); static String arrayToByteString(byte[] arr); }
Bencode { private Object parseList() throws IOException { List<Object> result = new ArrayList<>(); while (true) { byte b = readByte(); if (b == 'e') break; result.add(parseValue(b)); } return result; } private  Bencode(InputStream in); static void serialize(Object obj, OutputStream out); static Object parse(InputStream in); static byte[] byteStringToArray(String str); static String arrayToByteString(byte[] arr);  }