public static OutputStream wrapNativeOutputStream(PrintableStringWriter nativestream) {
    if (nativestream == Stella.STANDARD_OUTPUT.nativeStream) {
      return (Stella.STANDARD_OUTPUT);
    }
    else {
      { OutputStream self000 = OutputStream.newOutputStream();

        self000.nativeStream = nativestream;
        { OutputStream value000 = self000;

          return (value000);
        }
      }
    }
  }