⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleio.java

📁 用java写的SFTP代码
💻 JAVA
字号:
import java.io.*;
public class SimpleIO {
	InputStream is;
	public SimpleIO(InputStream is) {
		this.is = is;
	}
	public String readString() {
		byte[] buff = new byte[128];
		int n=0;
		try {
			n = is.read(buff);
		}catch(IOException e) {
			System.out.print("不能从键盘读入");
		}
		String s = new String(buff,0,n-2);// 注意这个地方
		buff = null;
		return s;
		
	}
}

⌨️ 快捷键说明

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