PDF file with empty pages appearing after Copying using Java Files.copy

后端 未结 2 1871
迷失自我
迷失自我 2021-01-16 05:10

I am trying to copy a file in my Class path to another temp location.

Here is the code for it:

    InputStream inputStream = this.getClass().getClass         


        
2条回答
  •  清酒与你
    2021-01-16 05:28

    Yes, this worked for me too; in Maven documentation i found this for more information;

    Warning: Do not filter files with binary content like images! This will most likely result in corrupt output. If you have both text files and binary files as resources, you need to declare two mutually exclusive resource sets. The first resource set defines the files to be filtered and the other resource set defines the files to copy unaltered

提交回复
热议问题