Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String cipherText =""; // for example
- BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8")));
- int c;
- while((c = reader.read()) != -1) {// read the entire file
- char character = (char) c;
- if (Character.isLetter(character)){ // take only the letters
- cipherText+=character; // append this letter to the string
- }
- }
- //finally test it
- System.out.println(cipherText);
- cipherText = cipherText.toUpperCase();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement