Please Help..
package com.codegym.task.task18.task1814;
import java.io.*;
/*
UnsupportedFileName
*/
public class TxtInputStream extends FileInputStream {
private final String fileName;
public TxtInputStream(String fileName) throws IOException, UnsupportedFileNameException {
this.fileName = fileName;
if(fileName.substring(fileName.length()).contains(".txt"))
new FileInputStream(fileName);
else{
throw new UnsupportedFileNameException();
super.close();
}
}
public static void main(String[] args) {
}
}