cyrillicwinreader.java
来自「Online Map for Mobile」· Java 代码 · 共 25 行
JAVA
25 行
import java.io.*;
public class CyrillicWinReader extends Reader {
public CyrillicWinReader(InputStream stream) {
this.stream = stream;
}
public int read(char[] cbuf, int off, int len) throws IOException {
byte[] buf = new byte[len];
int rc = stream.read(buf, 0, len);
for (int i = 0; i < rc; i++) {
byte b = buf[i];
cbuf[off++] = (char)(b < 0 ? b == -88 ? 0x401 : b == -72 ? 0x451 :
(0x400 | ((b & 0x7f) - 0x30)) : b);
}
return rc;
}
public void close() throws IOException {
stream.close();
}
private InputStream stream;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?