File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
io/src/test/java/com/itextpdf/io/image Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,17 @@ This file is part of the iText (R) project.
49
49
import org .junit .experimental .categories .Category ;
50
50
51
51
import java .io .File ;
52
+ import java .io .FileInputStream ;
52
53
import java .io .IOException ;
53
54
import java .nio .file .Files ;
54
-
55
+ import com . itextpdf . io . util . StreamUtil ;
55
56
@ Category (UnitTest .class )
56
57
public class GifTest {
57
58
public static final String sourceFolder = "./src/test/resources/com/itextpdf/io/image/" ;
58
59
59
60
@ Test
60
61
public void gifImageTest () throws IOException {
61
- byte [] fileContent = Files . readAllBytes ( new File ( sourceFolder + "WP_20140410_001.gif" ). toPath ( ) );
62
+ byte [] fileContent = StreamUtil . inputStreamToArray ( new FileInputStream ( sourceFolder + "WP_20140410_001.gif" ) );
62
63
ImageData img = ImageDataFactory .create ( fileContent , false );
63
64
Assert .assertTrue ( img .isRawImage () );
64
65
Assert .assertEquals ( ImageType .GIF , img .getOriginalType () );
You can’t perform that action at this time.
0 commit comments