/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author ICI Makati */ //Byte ArrayOutputStream Class // is a little more sophisticated than its input complement. It creates // an output stream on a byte array, but provides additional capabilities to // allow the output array to grow to accomodate new data that is written to it. import java.lang.System; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; public class byteArrayOutputStream { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException { //Sample prog demo for Byte Array I/O ByteArrayOutputStream outStream= new ByteArrayOutputStream(); String s="This is a test."; for (int i=0;i