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