cat.bsh
来自「用java 编写的源码开放的文本编辑器。有很多有用的特性」· BSH 代码 · 共 46 行
BSH
46 行
/** Print the contents of filename, url, or stream (like Unix cat)*/bsh.help.cat = "usage: cat( filename )";/** cat comment*/cat( String filename ) { file = pathToFile( filename ); if ( !file.exists() || !file.canRead() ) { print( "Can't read " + file ); return; } cat ( new FileReader( file ) );}/** cat comment*/cat( URL url ) { cat( url.openStream() );}cat( InputStream ins ) { bin = new BufferedReader( new InputStreamReader( ins ) ); cat( bin );}cat( Reader reader ) { try { bin = new BufferedReader( reader ); while ( (line=bin.readLine() ) != null ) print( line ); } catch ( Exception e ) { print( "Error reading stream:"+ e); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?