ByteArrayCoder extends AtomicCoder<byte[]> { public static ByteArrayCoder of() { return INSTANCE; } private  ByteArrayCoder(); static ByteArrayCoder of(); @Override void encode(byte[] value, OutputStream outStream); @Override void encode(byte[] value, OutputStream outStream, Context context); void encodeAndOwn(byte[] value, OutputStream outStream, Context context); @Override byte[] decode(InputStream inStream); @Override byte[] decode(InputStream inStream, Context context); @Override void verifyDeterministic(); @Override Object structuralValue(byte[] value); @Override boolean isRegisterByteSizeObserverCheap(byte[] value); @Override TypeDescriptor<byte[]> getEncodedTypeDescriptor();  }
@Test public void testRegisterByteSizeObserver() throws Exception { CoderProperties.testByteCount( ByteArrayCoder.of(), Coder.Context.OUTER, new byte[][] {{0xa, 0xb, 0xc}}); CoderProperties.testByteCount( ByteArrayCoder.of(), Coder.Context.NESTED, new byte[][] {{0xa, 0xb, 0xc}, {}, {}, {0xd, 0xe}, {}}); }