Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileOutputStream writer = new FileOutputStream("output.txt");
- Scanner scanner = new Scanner(Test.class.getResourceAsStream("input.txt"));
- String line;
- while(scanner.hasNextLine()){
- line = scanner.nextLine();
- String[] split = line.split(" ");
- byte[] chars = new byte[split.length];
- for (int i = 0; i < split.length; i++)
- chars[i] = (byte) (int) Integer.valueOf(split[i]);
- writer.write(chars);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement