fileSystem added

This commit is contained in:
ddaa2000 2020-04-11 18:47:43 +08:00
parent 575a64b4f6
commit 56e6a9a7d4

View File

@ -12,6 +12,7 @@ import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;
@SpringBootTest
@RunWith(SpringRunner.class)
@ -63,13 +64,9 @@ public class FileSystemTest {
InputStream inputStream = fileSystem.getFile(id1);
byte[] bytes = new byte[200];
try {
inputStream.read(bytes);
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(bytes.toString());
Scanner scanner = new Scanner(inputStream, "UTF-8");
String text = scanner.useDelimiter("\\A").next();
System.out.println(text);
}
}