Monday, March 9, 2015

String Buffer To byte Array in java



String Buffer To byte Array

public class StringBufferToByteArrayExample
{
 public static void main(String[] args)
{           
StringBuffer sbf = new StringBuffer("Java StringBuffer To byte array example");
 byte bytes[] = sbf.toString().getBytes();
 System.out.println("StringBuffer converted to byte array");
   }
}

No comments:

Post a Comment