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
|
@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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user