📄 iomethods.java
字号:
import java.io.*;public class IOmethods { public void writeString(String s, RandomAccessFile out) throws IOException { for (int i = 0; i < s.length(); i++) out.writeChar(s.charAt(i)); } public String readString(int len, RandomAccessFile in) throws IOException { String s = ""; for (int i = 0; i < len; i++) s += in.readChar(); return s; } public String readLine() throws IOException { int ch; String s = ""; while (true) { ch = System.in.read(); if (ch == -1 || (char)ch == '\n') // end of file or end of line; break; else if ((char)ch != '\r') // ignore carriage return; s = s + (char)ch; } return s; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -