code: public String receiveString() throws IOException {
      int len = pgInput.scanCStringLength();
      String res = encoding.decode(pgInput.getBuffer(), pgInput.getIndex(), len - 1);
      pgInput.skip(len);
      return res;
    }
docs: Receives a null-terminated string from the backend. If we don't see a null, then we assume
  something has gone wrong.
  
  @return string from back end
  @throws IOException if an I/O error occurs, or end of file