displaylicense.java

来自「有关编译器的编译器.」· Java 代码 · 共 69 行

JAVA
69
字号
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of SableCC.                             * * See the file "LICENSE" for copyright information and the  * * terms and conditions for copying, distribution and        * * modification of SableCC.                                  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */package org.sablecc.sablecc;import java.io.*;class DisplayLicense{  DisplayLicense()  {    try    {      BufferedReader in =        new BufferedReader(          new InputStreamReader(            getClass().getResourceAsStream("LICENSE")));      System.out.println("---- FILE: LICENSE ----");      String s;      while((s = in.readLine()) != null)      {        System.out.println(s);      }      in.close();      System.out.println("---- END OF FILE: SableVM-LICENSE ----");      System.out.println();      System.out.println("---- FILE: AUTHORS ----");      in =        new BufferedReader(          new InputStreamReader(            getClass().getResourceAsStream("AUTHORS")));      while((s = in.readLine()) != null)      {        System.out.println(s);      }      in.close();      System.out.println("---- END OF FILE: AUTHORS ----");      System.out.println();      System.out.println("---- FILE: COPYING-LESSER ----");      in =        new BufferedReader(          new InputStreamReader(            getClass().getResourceAsStream("COPYING-LESSER")));      while((s = in.readLine()) != null)      {        System.out.println(s);      }      in.close();      System.out.println("---- END OF FILE: COPYING-LESSER ----");    }    catch(Exception e)    {      System.out.println(e);      System.exit(1);    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?