Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

FileInputStream from file

@Test
public void givenUsingPlainJava_whenConvertingFileToInputStream_thenCorrect() 
  throws IOException {
    File initialFile = new File("src/main/resources/sample.txt");
    InputStream targetStream = new FileInputStream(initialFile);
}
Copy
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #FileInputStream #file
ADD COMMENT
Topic
Name
9+5 =