@Test public void read() throws IOException { INT64 given = INT64.MAX_VALUE; List<INT64> expected = new ArrayList<>(); expected.add(given); byte[] givenBytes = ArrayUtils.join( new UINT32(1).bytes(), given.bytes() ); InputStream givenInputStream = new ByteArrayInputStream(givenBytes); List<INT64> actual = AINT64.read(givenInputStream); assertThat(actual, is(expected)); }
public static List<INT64> read(InputStream is) throws IOException { Validators.notNull("is", is); long length = UINT32.read(is).longValue(); List<INT64> list = new ArrayList<>((int) length); for (int i = 0; i < length; i++) { list.add(INT64.read(is)); } return list; }
AINT64 { public static List<INT64> read(InputStream is) throws IOException { Validators.notNull("is", is); long length = UINT32.read(is).longValue(); List<INT64> list = new ArrayList<>((int) length); for (int i = 0; i < length; i++) { list.add(INT64.read(is)); } return list; } }
AINT64 { public static List<INT64> read(InputStream is) throws IOException { Validators.notNull("is", is); long length = UINT32.read(is).longValue(); List<INT64> list = new ArrayList<>((int) length); for (int i = 0; i < length; i++) { list.add(INT64.read(is)); } return list; } private  AINT64(); }
AINT64 { public static List<INT64> read(InputStream is) throws IOException { Validators.notNull("is", is); long length = UINT32.read(is).longValue(); List<INT64> list = new ArrayList<>((int) length); for (int i = 0; i < length; i++) { list.add(INT64.read(is)); } return list; } private  AINT64(); static List<INT64> read(InputStream is); }
AINT64 { public static List<INT64> read(InputStream is) throws IOException { Validators.notNull("is", is); long length = UINT32.read(is).longValue(); List<INT64> list = new ArrayList<>((int) length); for (int i = 0; i < length; i++) { list.add(INT64.read(is)); } return list; } private  AINT64(); static List<INT64> read(InputStream is);  }