src/main/java/org/nustaq/offheap/structs/structtypes/StructString.java
public void setString(String s) {
        if ( s == null ) {
            setLen(0);
            return;
        }
        if ( s.length() > charsLen() ) {
            throw new RuntimeException("String length exceeds buffer size. String len "+s.length()+" charsLen:"+charsLen());
        }
        for (int i=0; i < s.length(); i++) {
            chars(i,s.charAt(i));
        }
        len = s.length();
    }
public void setString(String s) {
        if ( s == null ) {
            setLen(0);
            return;
        }
        if ( s.length() > charsLen() ) {
            throw new RuntimeException("String length exceeds buffer size. String len "+s.length()+" charsLen:"+charsLen());
        }
        for (int i=0; i < s.length(); i++) {
            chars(i,s.charAt(i));
        }
        len = s.length();
    }
public void setString ( String s ) { if ( s == null ) { setLen ( 0 ) ; return ; } if ( s . length ( ) > charsLen ( ) ) { throw new RuntimeException ( "String length exceeds buffer size. String len " + s . length ( ) + " charsLen:" + charsLen ( ) ) ; } for ( int i = 0 ; i < s . length ( ) ; i ++ ) { chars ( i , s . charAt ( i ) ) ; } len = s . length ( ) ; }
modify content of this StructString. The length of the new String must not exceed
the length of internal char array
@param s
modify content of this StructString . The length of the new String must not exceed the length of internal char array