@@ -0,0 +1,1724 @@
+package learntocode.javaapi.io_and_nio.io;%0D%0A%0D%0Aimport java.io.ByteArrayInputStream;%0D%0A%0D%0Apublic class ByteArrayInputStreamsExample %7B%0D%0A%0D%0A    public static void main (String%5B%5D args) %7B%0D%0A%0D%0A        /*  ------------------------------%0D%0A            ------------------------------%0D%0A                Print letters of alphabet from 10th letter to 20th.%0D%0A            ------------------------------%0D%0A            ------------------------------%0D%0A        */%0D%0A        /* Alphabet */%0D%0A        String abc = %22abcdefghijklmnopqrstuvwzyx%22;%0D%0A        byte%5B%5D arr = abc.getBytes();%0D%0A%0D%0A        /* This will contain letters from 10th to 20th (The inputs are: start from here and then include 10 more bytes to input stream */%0D%0A        ByteArrayInputStream inputStream = new ByteArrayInputStream(arr, 10,10);%0D%0A        int b;%0D%0A        while ((b = inputStream.read()) != -1) %7B%0D%0A            System.out.print((char) b + %22 %22);%0D%0A        %7D%0D%0A        System.out.println(%22%5Cn%22);%0D%0A%0D%0A        /*  ------------------------------%0D%0A            ------------------------------%0D%0A                Mark after 5 bytes, mark, continue reading, than reset to mark and output in upper register%0D%0A            ------------------------------%0D%0A            ------------------------------%0D%0A        */%0D%0A        inputStream = new ByteArrayInputStream(arr, 10,10);%0D%0A%0D%0A        int i =0;%0D%0A        while ((b = inputStream.read()) != -1) %7B%0D%0A            ++i;%0D%0A            System.out.print((char) b + %22 %22);%0D%0A            if (i == 5) %7B%0D%0A                inputStream.mark(i);%0D%0A            %7D%0D%0A        %7D%0D%0A        System.out.println();%0D%0A        inputStream.reset();%0D%0A        while ((b = inputStream.read()) != -1) %7B%0D%0A            System.out.print(Character.toUpperCase((char) b) + %22 %22);%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

Add byte array input stream example