final int messageSize = 25;
byte message[] = new byte[messageSize];
Arrays.fill(message,msgChar);
TextFrame frame = new TextFrame();
frame.setPayload(ByteBuffer.wrap(message));
frame.setMask(Hex.asByteArray("11223344"));
ByteBuffer buf = UnitGenerator.generate(frame);
LOG.debug("Buf: {}",BufferUtil.toDetailString(buf));
ByteBuffer payload = buf.slice();
payload.position(6); // where payload starts