question: public int format ( String val , byte [ ] array , int off , int len ) { if ( val == null ) { for ( int i = 0 ; i < len ; i ++ ) { array [ off + i ] = ( byte ) ' ' ; } return off + len ; } int slen = val . length ( ) ; if ( slen > len || slen > array . length - off ) { val = val . substring ( 0 , len ) ; slen = len ; } System . arraycopy ( AsciiFuncs . getBytes ( val ) , 0 , array , off , slen ) ; return off + slen ; }
target:  Insert a String into an existing character array. If the String is longer than len, then only the the initial len characters will be inserted.