import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Random;
import java.util.Scanner;
import java.util.StringJoiner;
import java.util.regex.Pattern;

public class HelloScannerInputStream {

    private static String FILENAME = "hello_scanner_input_stream.txt";

    public static void main(String... args) {
        System.out.println("Hello Scanner Input Stream!");

        StringJoiner sj = new StringJoiner(" ");
        sj.add("Scanner");

        sj.add(new BigDecimal(10.0d * 0.0825d).setScale(2, RoundingMode.UP).toPlainString());
        sj.add(new BigInteger(64, new Random()).toString());
        sj.add(Boolean.TRUE.toString());
        sj.add(Byte.toString(Byte.MAX_VALUE));
        sj.add(Double.toString(Double.MAX_VALUE));
        sj.add(Float.toString(Float.MAX_VALUE));
        sj.add(Integer.toString(Integer.MAX_VALUE));
        sj.add(Long.toString(Long.MAX_VALUE));
        sj.add(Short.toString(Short.MAX_VALUE));
        sj.add("Ozymandias");

        String string = sj.toString();

        try {
            Files.write(Paths.get(FILENAME), string.getBytes());
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(-1);
        }

        try {
            Scanner sc = new Scanner(new FileInputStream(FILENAME));
            String st01 = sc.next();
            BigDecimal bd01 = sc.nextBigDecimal();
            BigInteger bi01 = sc.nextBigInteger();
            boolean bo01 = sc.nextBoolean();
            byte by01 = sc.nextByte();
            double db01 = sc.nextDouble();
            float fl01 = sc.nextFloat();
            int in01 = sc.nextInt();
            long lo01 = sc.nextLong();
            short sh01 = sc.nextShort();
            String st02 = sc.next(Pattern.compile("Ozy.*"));
            sc.close();

            System.out.println("---");
            System.out.println(string);
            System.out.println("---");
            System.out.printf("sc.next();           = <%s>\n", st01);
            System.out.printf("sc.nextBigDecimal(); = %s\n", bd01);
            System.out.printf("sc.nextBigInteger(); = %s\n", bi01);
            System.out.printf("sc.nextBoolean();    = %s\n", bo01);
            System.out.printf("sc.nextByte();       = %s\n", by01);
            System.out.printf("sc.nextDouble();     = %s\n", db01);
            System.out.printf("sc.nextFloat();      = %s\n", fl01);
            System.out.printf("sc.nextInt();        = %s\n", in01);
            System.out.printf("sc.nextLong();       = %s\n", lo01);
            System.out.printf("sc.nextShort();      = %s\n", sh01);
            System.out.printf("sc.next(Pattern.compile(\"Ozy.*\")); = <%s>\n", st02);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }
}

@@ -12,27 +12,16 @@
 .io.File
-InputStream
 ;%0Aimport
@@ -365,27 +365,24 @@
 oScanner
-InputStream
+ReadFile
  %7B%0A%0A    
@@ -433,20 +433,17 @@
 ner_
-input_stream
+read_file
 .txt
@@ -538,20 +538,17 @@
 ner 
-Input Stream
+Read File
 !%22);
@@ -621,24 +621,32 @@
 %22Scanner%22);%0A
+        
 %0A        sj.
@@ -1395,30 +1395,17 @@
     try 
-%7B%0A            
+(
 Scanner 
@@ -1433,19 +1433,8 @@
 File
-InputStream
 (FIL
@@ -1440,17 +1440,19 @@
 LENAME))
-;
+) %7B
 %0A       
@@ -1932,32 +1932,8 @@
 %22));
-%0A            sc.close();
 %0A%0A  

Update HelloScannerInputStream.java