[tammo@lafk-T470 src]$ java com.company.Main [INSERT]
Welcome to our file validator. We support JPEG, PDF, GIF, PNG files.
Type the absolute path to the file you want to validate:
Or type 'x' to terminate the program
/home/tammo/m.txt
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format!
at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29)
at com.company.logic.FileValidator.validate(FileValidator.java:19)
at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54)
at com.company.Main.main(Main.java:10)
[tammo@lafk-T470 src]$ java com.company.Main [INSERT]
Welcome to our file validator. We support JPEG, PDF, GIF, PNG files.
Type the absolute path to the file you want to validate:
Or type 'x' to terminate the program
/home/tammo/m.png
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format!
at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29)
at com.company.logic.FileValidator.validate(FileValidator.java:19)
at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54)
at com.company.Main.main(Main.java:10)
[tammo@lafk-T470 src]$ java com.company.Main [INSERT]
Welcome to our file validator. We support JPEG, PDF, GIF, PNG files.
Type the absolute path to the file you want to validate:
Or type 'x' to terminate the program
/home/tammo/b.pdf
Exception in thread "main" java.io.EOFException
at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397)
at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:15)
at com.company.logic.FileValidator.validate(FileValidator.java:19)
at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54)
at com.company.Main.main(Main.java:10)
[tammo@lafk-T470 src]$ java com.company.Main [INSERT]
Welcome to our file validator. We support JPEG, PDF, GIF, PNG files.
Type the absolute path to the file you want to validate:
Or type 'x' to terminate the program
/home/tammo/a.jpeg
Exception in thread "main" java.io.EOFException
at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397)
at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:15)
at com.company.logic.FileValidator.validate(FileValidator.java:19)
at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54)
at com.company.Main.main(Main.java:10)
[tammo@lafk-T470 src]$ java com.company.Main [INSERT]
Welcome to our file validator. We support JPEG, PDF, GIF, PNG files.
Type the absolute path to the file you want to validate:
Or type 'x' to terminate the program
/home/tammo/m.jpg
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format!
at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29)
at com.company.logic.FileValidator.validate(FileValidator.java:19)
at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54)
at com.company.Main.main(Main.java:10)
[tammo@lafk-T470 src]$ java com.company.Main [INSERT] Welcome to our file validator. We support JPEG, PDF, GIF, PNG files. Type the absolute path to the file you want to validate: Or type 'x' to terminate the program /home/tammo/m.txt Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format! at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29) at com.company.logic.FileValidator.validate(FileValidator.java:19) at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54) at com.company.Main.main(Main.java:10) [tammo@lafk-T470 src]$ java com.company.Main [INSERT] Welcome to our file validator. We support JPEG, PDF, GIF, PNG files. Type the absolute path to the file you want to validate: Or type 'x' to terminate the program /home/tammo/m.png Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format! at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29) at com.company.logic.FileValidator.validate(FileValidator.java:19) at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54) at com.company.Main.main(Main.java:10) [tammo@lafk-T470 src]$ java com.company.Main [INSERT] Welcome to our file validator. We support JPEG, PDF, GIF, PNG files. Type the absolute path to the file you want to validate: Or type 'x' to terminate the program /home/tammo/b.pdf Exception in thread "main" java.io.EOFException at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397) at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:15) at com.company.logic.FileValidator.validate(FileValidator.java:19) at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54) at com.company.Main.main(Main.java:10) [tammo@lafk-T470 src]$ java com.company.Main [INSERT] Welcome to our file validator. We support JPEG, PDF, GIF, PNG files. Type the absolute path to the file you want to validate: Or type 'x' to terminate the program /home/tammo/a.jpeg Exception in thread "main" java.io.EOFException at java.base/java.io.DataInputStream.readInt(DataInputStream.java:397) at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:15) at com.company.logic.FileValidator.validate(FileValidator.java:19) at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54) at com.company.Main.main(Main.java:10) [tammo@lafk-T470 src]$ java com.company.Main [INSERT] Welcome to our file validator. We support JPEG, PDF, GIF, PNG files. Type the absolute path to the file you want to validate: Or type 'x' to terminate the program /home/tammo/m.jpg Exception in thread "main" java.lang.IllegalArgumentException: Unsupported file format! at com.company.logic.FileSignatureChecker.checkFileSignature(FileSignatureChecker.java:29) at com.company.logic.FileValidator.validate(FileValidator.java:19) at com.company.logic.FileValidator.performMainLoop(FileValidator.java:54) at com.company.Main.main(Main.java:10)