TechieDrill Your World Of Technical Tutorials

Posts Tagged ‘byte’

ByteArrayInputStream

11.22.2009 · Posted in Java

import java.io.*; class ByteArrayInputStreamDemo { public static void main(String [] args) throws IOException { byte data[]=”Here is a String”.getBytes(); ByteArrayInputStream in = new ByteArrayInputStream(data); int ch; while((ch = in.read()) !=-1) { System.out.println(ch+ ” “); System.out.println((char)ch+” “); } } }import java.io.*; class ByteArrayInputStreamDemo { public static void main(String [] args) throws IOException { byte data[]=”Here is a String”.getBytes(); ByteArrayInputStream in = ...