protected long readTerminalCount(final BitInputStream in, final long size)
    throws IOException {
    if (SERIALIZATION_CHECKS) {
      in.expect(SerializationChecks.BeforeTerminal);
    }
    final long readBoundedLong = in.readBoundedLong(1 + size);
    if (SERIALIZATION_CHECKS) {
      in.expect(SerializationChecks.AfterTerminal);
    }
    return readBoundedLong;
  }
protected long readTerminalCount ( final BitInputStream in , final long size ) throws IOException { if ( SERIALIZATION_CHECKS ) { in . expect ( SerializationChecks . BeforeTerminal ) ; } final long readBoundedLong = in . readBoundedLong ( 1 + size ) ; if ( SERIALIZATION_CHECKS ) { in . expect ( SerializationChecks . AfterTerminal ) ; } return readBoundedLong ; }
Read terminal count long.

@param in   the in
@param size the size
@return the long
@throws IOException the io exception