public static Integer parseChunkLength(String chLengthKB) throws ConfigurationException
    {
        if (chLengthKB == null)
            return null;

        try
        {
            int parsed = Integer.parseInt(chLengthKB);
            if (parsed > Integer.MAX_VALUE / 1024)
                throw new ConfigurationException("Value of " + CHUNK_LENGTH_KB + " is too large (" + parsed + ")");
            return 1024 * parsed;
        }
        catch (NumberFormatException e)
        {
            throw new ConfigurationException("Invalid value for " + CHUNK_LENGTH_KB, e);
        }
    }
public static Integer parseChunkLength ( String chLengthKB ) throws ConfigurationException { if ( chLengthKB == null ) return null ; try { int parsed = Integer . parseInt ( chLengthKB ) ; if ( parsed > Integer . MAX_VALUE / 1024 ) throw new ConfigurationException ( "Value of " + CHUNK_LENGTH_KB + " is too large (" + parsed + ")" ) ; return 1024 * parsed ; } catch ( NumberFormatException e ) { throw new ConfigurationException ( "Invalid value for " + CHUNK_LENGTH_KB , e ) ; } }
Parse the chunk length (in KB) and returns it as bytes.