private void setString ( int offset , int maxLength , String theString ) { byte [ ] stringBytes = theString . getBytes ( StandardCharsets . ISO_8859_1 ) ; int length = Math . min ( stringBytes . length , maxLength ) ; System . arraycopy ( stringBytes , 0 , buffer , offset , length ) ; buffer [ offset + length ] = 0 ; }
Put a string into the buffer at the offset given .