public static void initializeFileInputStream(InputFileStream self) {
    if (!(self.filename != null)) {
      return;
    }
    { String filename = Stella.translateLogicalPathname(self.filename);

      { Keyword testValue000 = self.ifNotExistsAction;

        if ((testValue000 == Stella.KWD_ABORT) ||
            (testValue000 == Stella.KWD_PROBE)) {
          if (!(Stella.probeFileP(filename))) {
            return;
          }
        }
        else if (testValue000 == Stella.KWD_ERROR) {
          Stella.ensureFileExists(filename, "initialize-file-input-stream");
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("initialize-file-input-stream: illegal :if-not-exists action: `" + self.ifNotExistsAction + "'");
            throw ((BadArgumentException)(BadArgumentException.newBadArgumentException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
      
      FileInputStream inputStream;
	try {
		inputStream = new FileInputStream(filename);
		self.nativeStream = new PushbackBufferedReader(inputStream, "utf8");
	} catch (FileNotFoundException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (UnsupportedEncodingException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

      if (self.nativeStream == null) {
        { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

          stream001.nativeStream.print("initialize-file-input-stream: Could not open `" + self + "'");
          throw ((InputOutputException)(InputOutputException.newInputOutputException(stream001.theStringReader()).fillInStackTrace()));
        }
      }
      self.state = Stella.KWD_OPEN;
      Stella.$OPEN_FILE_STREAMS$.push(self);
    }
  }