public final String getFixString(final int pos, final int len, String charsetName) {
        if (pos + len > limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
                                                                             + (pos < 0 ? pos : (pos + len)));

        final int from = origin + pos;
        final int end = from + len;
        byte[] buf = buffer;
        int found = from;
        for (; (found < end) && buf[found] != '\0'; found++)
            /* empty loop */;

        try {
            return new String(buf, from, found - from, charsetName);
        } catch (UnsupportedEncodingException e) {
            throw new IllegalArgumentException("Unsupported encoding: " + charsetName, e);
        }
    }
public final String getFixString ( final int pos , final int len , String charsetName ) { if ( pos + len > limit || pos < 0 ) throw new IllegalArgumentException ( "limit excceed: " + ( pos < 0 ? pos : ( pos + len ) ) ) ; final int from = origin + pos ; final int end = from + len ; byte [ ] buf = buffer ; int found = from ; for ( ; ( found < end ) && buf [ found ] != '\0' ; found ++ ) ; try { return new String ( buf , from , found - from , charsetName ) ; } catch ( UnsupportedEncodingException e ) { throw new IllegalArgumentException ( "Unsupported encoding: " + charsetName , e ) ; } }
Return fix length string from buffer.