setScreenBuffer function now takes array of java chars