Java tutorial
import java.nio.CharBuffer; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; public class Main { public static void main(String[] argv) throws Exception { Charset charset = Charset.forName("ISO-8859-1"); CharsetDecoder decoder = charset.newDecoder(); CharBuffer cbuf = CharBuffer.allocate(10); decoder.flush(cbuf); } }