All pastes #556930 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-10 20:15 UTC
rendered paste body
private class CodeRange 
    {
        byte[] from;
        byte[] to;
        String code;
        
        public IpCountryRange( String line )
        {
            int startIdx, endIdx;
            startIdx = 0;
            
            endIdx = line.indexOf( ',', startIdx );
            from = AddressUtils.parseIntIP( line.substring( startIdx, endIdx ) );
            
            startIdx = endIdx + 1;
            endIdx = line.indexOf( ',', startIdx );
            to = AddressUtils.parseIntIP( line.substring( startIdx, endIdx ) );
            
            startIdx = endIdx + 1;
            String subCode = line.substring( startIdx );
            code = subCode.intern();
        }
}