class BigIntegerCoder extends AtomicCoder<BigInteger> {

  @Override
  protected long getEncodedElementByteSize(BigInteger value) throws Exception {
    checkNotNull(value, String.format("cannot encode a null %s", BigInteger.class.getSimpleName()));
    return BYTE_ARRAY_CODER.getEncodedElementByteSize(value.toByteArray());
  }

  private  BigIntegerCoder();

}