Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.logging.Filter;
- public class Main {
- public static void main(String[] args) {
- // ispecati gi site soglaski
- try {
- FileOutputStream fout = new FileOutputStream("out.txt");
- CFilter customout = new CFilter(fout);
- for(int i = System.in.read(); i != 'X'; i = System.in.read()) {
- customout.write(i);
- }
- }
- catch (IOException ex) {
- System.out.println(ex);
- }
- }
- }
- class CFilter extends FilterOutputStream {
- public CFilter(OutputStream out) {
- super(out);
- }
- @Override
- public void write(int b) {
- if(!(b == 65 || b == 69 || b == 73 || b == 79 || b == 85)) {
- try {
- super.write(b);
- }
- catch (IOException ex) {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement