fix(文件): 修改文件的测试类

This commit is contained in:
lqyan
2025-02-20 19:18:13 +08:00
parent 2765639cff
commit 31b9a53799

View File

@@ -108,11 +108,9 @@ public class FileApiTest {
@Test @Test
public void testGetFileStream() throws IOException { public void testGetFileStream() throws IOException {
InputStream in = execution.getFileInputStream("jhadmin", "$HOME/aaa.sh"); InputStream in = execution.getFileInputStream("jhadmin", "$HOME/aaa.sh");
while (in.available() > 0) { byte[] bytes = new byte[1024];
// 读取文件内容 while (in.read(bytes) != -1) {
int read = in.read(); System.out.println(new String(bytes));
System.out.println("读取文件内容:" + read);
} }
} }