javastringbuffer

Convert a StringBuffer to a byte Array in Java


How might I, in Java, convert a StringBuffer to a byte array?


Solution

  • I say we have an answer, from Greg:

    String.valueOf(stringBuffer).getBytes()