mirror of
https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
synced 2026-03-22 06:15:10 +08:00
fix(文件): 修改文件的测试类
This commit is contained in:
@@ -108,11 +108,9 @@ public class FileApiTest {
|
||||
@Test
|
||||
public void testGetFileStream() throws IOException {
|
||||
InputStream in = execution.getFileInputStream("jhadmin", "$HOME/aaa.sh");
|
||||
while (in.available() > 0) {
|
||||
// 读取文件内容
|
||||
int read = in.read();
|
||||
System.out.println("读取文件内容:" + read);
|
||||
|
||||
byte[] bytes = new byte[1024];
|
||||
while (in.read(bytes) != -1) {
|
||||
System.out.println(new String(bytes));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user