docs: public synchronized void store(NodeReferences refs) throws ItemStateException {
          if (!initialized) {
              throw new IllegalStateException("not initialized");
          }
  
          // check if insert or update
          boolean update = existsReferencesTo(refs.getTargetId());
          String sql = (update) ? nodeReferenceUpdateSQL : nodeReferenceInsertSQL;
  
          try {
              ByteArrayOutputStream out =
                      new ByteArrayOutputStream(INITIAL_BUFFER_SIZE);
              // serialize references
              Serializer.serialize(refs, out);
  
              Object[] params = createParams(refs.getTargetId(), out.toByteArray(), true);
              conHelper.exec(sql, params);
              
              // there's no need to close a ByteArrayOutputStream
              //out.close();
          } catch (Exception e) {
              String msg = "failed to write " + refs;
              log.error(msg, e);
              throw new ItemStateException(msg, e);
          }
      }