code: static Bytes createViaDataOutput(@NonNull IOConsumer<ExtendedDataOutput> creator, int expectedSize)
  		throws IOException
  	{
  		Objects.requireNonNull(creator);
  		if(expectedSize <= 0) throw new IllegalArgumentException("expectedSize should be larger than 0");
  
  		ByteArrayOutputStream out = new ByteArrayOutputStream(expectedSize);
  		try(ExtendedDataOutput dataOut = new ExtendedDataOutputStream(out))
  		{
  			creator.accept(dataOut);
  		}
  		return Bytes.create(out.toByteArray());
  	}
docs: Create an instance of {@link Bytes} that is created and stored in
  memory.
  
  @param creator
  the creator of byte data
  @param expectedSize
  the expected size of the created byte data, used to allocate memory
  for the data
  @return
  instance of bytes