### Question:
BinaryInputArchive implements InputArchive { public byte[] readBuffer(String tag) throws IOException { int len = readInt(tag); if (len == -1) { return null; } checkLength(len); byte[] arr = new byte[len]; in.readFully(arr); return arr; } BinaryInputArchive(DataInput in);  BinaryInputArchive(DataInput in, int maxBufferSize, int extraMaxBufferSize); static BinaryInputArchive getArchive(InputStream strm); byte readByte(String tag); boolean readBool(String tag); int readInt(String tag); long readLong(String tag); float readFloat(String tag); double readDouble(String tag); String readString(String tag); byte[] readBuffer(String tag); void readRecord(Record r, String tag); void startRecord(String tag); void endRecord(String tag); Index startVector(String tag); void endVector(String tag); Index startMap(String tag); void endMap(String tag); static final String UNREASONBLE_LENGTH; static final int maxBuffer; }### Answer:
@Test public void testBuffer() { final byte[] expected = "hello-world".getBytes(StandardCharsets.UTF_8); final String tag = "tag1"; checkWriterAndReader( (oa) -> oa.writeBuffer(expected, tag), (ia) -> { byte[] actual = ia.readBuffer(tag); assertArrayEquals(expected, actual); } ); }