在我的java项目中,我将FileInputStream传递给一个函数,我需要将其转换(类型转换为FileInputStream为string),如何做到这一点.
public static void checkfor(FileInputStream fis) {
String a=new String;
a=fis //how to do convert fileInputStream into string
print string here
}
Run Code Online (Sandbox Code Playgroud)