code: public static EConv open(byte[] source, byte[] destination, int ecflags) {
          byte[][] decorators = new byte[MAX_ECFLAGS_DECORATORS][];
  
          int numDecorators = decoratorNames(ecflags, decorators);
          if (numDecorators == -1) return null;
  
          EConv ec = open0(source, destination, ecflags & ERROR_HANDLER_MASK);
          if (ec == null) return null;
  
          for (int i = 0; i < numDecorators; i++) {
              if (!ec.decorateAtLast(decorators[i])) {
                  ec.close();
                  return null;
              }
          }
  
          ec.flags |= ecflags & ~ERROR_HANDLER_MASK;
          return ec;
      }
docs: /* rb_econv_open